Fixed: RemotePoster on v3 api provides local url rather than thetvdb url

This commit is contained in:
Taloth Saldono 2020-03-22 11:59:26 +01:00
parent e23a879669
commit 4219cdb364
3 changed files with 5 additions and 2 deletions

View File

@ -17,6 +17,7 @@ namespace NzbDrone.Core.MediaCover
{
public MediaCoverTypes CoverType { get; set; }
public string Url { get; set; }
public string RemoteUrl { get; set; }
public MediaCover()
{

View File

@ -77,7 +77,8 @@ namespace NzbDrone.Core.MediaCover
// Series isn't in Sonarr yet, map via a proxy to circument referrer issues
foreach (var mediaCover in covers)
{
mediaCover.Url = _mediaCoverProxy.RegisterUrl(mediaCover.Url);
mediaCover.RemoteUrl = mediaCover.Url;
mediaCover.Url = _mediaCoverProxy.RegisterUrl(mediaCover.RemoteUrl);
}
}
else
@ -86,6 +87,7 @@ namespace NzbDrone.Core.MediaCover
{
var filePath = GetCoverPath(seriesId, mediaCover.CoverType);
mediaCover.RemoteUrl = mediaCover.Url;
mediaCover.Url = _configFileProvider.UrlBase + @"/MediaCover/" + seriesId + "/" + mediaCover.CoverType.ToString().ToLower() + ".jpg";
if (_diskProvider.FileExists(filePath))

View File

@ -42,7 +42,7 @@ namespace Sonarr.Api.V3.Series
if (poster != null)
{
resource.RemotePoster = poster.Url;
resource.RemotePoster = poster.RemoteUrl;
}
resource.Folder = _fileNameBuilder.GetSeriesFolder(currentSeries);