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

pull/3660/head
Taloth Saldono 5 years ago
parent e23a879669
commit 4219cdb364

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

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

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

Loading…
Cancel
Save