mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Series fanart images won't be stored as episode screenshots
This commit is contained in:
parent
d765d1eaef
commit
175ae3e996
@ -4,6 +4,7 @@
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.Tv;
|
||||
@ -126,6 +127,10 @@ private void ValidateEpisode(Episode episode)
|
||||
{
|
||||
episode.AirDateUtc.Value.Kind.Should().Be(DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
episode.Images.Any(i => i.CoverType == MediaCoverTypes.Screenshot && i.Url.Contains("-940."))
|
||||
.Should()
|
||||
.BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ public TraktProxy(Logger logger, IHttpClient httpClient)
|
||||
|
||||
private IEnumerable<Show> SearchTrakt(string title)
|
||||
{
|
||||
|
||||
HttpRequest request;
|
||||
|
||||
var lowerTitle = title.ToLowerInvariant();
|
||||
@ -77,7 +76,6 @@ private IEnumerable<Show> SearchTrakt(string title)
|
||||
return _httpClient.Get<List<Show>>(request).Resource;
|
||||
}
|
||||
|
||||
|
||||
public List<Series> SearchForNewSeries(string title)
|
||||
{
|
||||
try
|
||||
@ -179,7 +177,11 @@ private static Episode MapEpisode(Trakt.Episode traktEpisode)
|
||||
episode.AirDateUtc = FromIso(traktEpisode.first_aired_iso);
|
||||
episode.Ratings = GetRatings(traktEpisode.ratings);
|
||||
|
||||
//Don't include series fanart images as episode screenshot
|
||||
if (!traktEpisode.images.screen.Contains("-940."))
|
||||
{
|
||||
episode.Images.Add(new MediaCover.MediaCover(MediaCoverTypes.Screenshot, traktEpisode.images.screen));
|
||||
}
|
||||
|
||||
return episode;
|
||||
}
|
||||
@ -314,7 +316,5 @@ private static Tv.Ratings GetRatings(Trakt.Ratings ratings)
|
||||
|
||||
return seasons;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user