From 4ca5e978ac50d63d70be1883c9b32309f0584a4d Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Wed, 13 Dec 2017 20:18:29 +0100 Subject: [PATCH] Fixed MediaCover endpoint. --- src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs | 1 + src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index c6c07cce4..218d185f5 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -52,6 +52,7 @@ namespace NzbDrone.Api.Frontend.Mappers resourceUrl = resourceUrl.ToLowerInvariant(); return !resourceUrl.StartsWith("/content") && + !resourceUrl.StartsWith("/mediacover") && !resourceUrl.Contains(".") && !resourceUrl.StartsWith("/login"); } diff --git a/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs index a4e5fb8f2..8a5626cf2 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/MediaCoverMapper.cs @@ -1,3 +1,4 @@ +using System; using System.IO; using System.Text.RegularExpressions; using NLog; @@ -42,7 +43,7 @@ namespace NzbDrone.Api.Frontend.Mappers public override bool CanHandle(string resourceUrl) { - return resourceUrl.StartsWith("/MediaCover"); + return resourceUrl.StartsWith("/MediaCover", StringComparison.InvariantCultureIgnoreCase); } } -} \ No newline at end of file +}