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 System.Linq;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
|
using NzbDrone.Core.MediaCover;
|
||||||
using NzbDrone.Core.MetadataSource;
|
using NzbDrone.Core.MetadataSource;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Tv;
|
||||||
|
@ -126,6 +127,10 @@ namespace NzbDrone.Core.Test.MetadataSourceTests
|
||||||
{
|
{
|
||||||
episode.AirDateUtc.Value.Kind.Should().Be(DateTimeKind.Utc);
|
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 @@ namespace NzbDrone.Core.MetadataSource
|
||||||
|
|
||||||
private IEnumerable<Show> SearchTrakt(string title)
|
private IEnumerable<Show> SearchTrakt(string title)
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpRequest request;
|
HttpRequest request;
|
||||||
|
|
||||||
var lowerTitle = title.ToLowerInvariant();
|
var lowerTitle = title.ToLowerInvariant();
|
||||||
|
@ -77,7 +76,6 @@ namespace NzbDrone.Core.MetadataSource
|
||||||
return _httpClient.Get<List<Show>>(request).Resource;
|
return _httpClient.Get<List<Show>>(request).Resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Series> SearchForNewSeries(string title)
|
public List<Series> SearchForNewSeries(string title)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -179,8 +177,12 @@ namespace NzbDrone.Core.MetadataSource
|
||||||
episode.AirDateUtc = FromIso(traktEpisode.first_aired_iso);
|
episode.AirDateUtc = FromIso(traktEpisode.first_aired_iso);
|
||||||
episode.Ratings = GetRatings(traktEpisode.ratings);
|
episode.Ratings = GetRatings(traktEpisode.ratings);
|
||||||
|
|
||||||
episode.Images.Add(new MediaCover.MediaCover(MediaCoverTypes.Screenshot, traktEpisode.images.screen));
|
//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;
|
return episode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +316,5 @@ namespace NzbDrone.Core.MetadataSource
|
||||||
|
|
||||||
return seasons;
|
return seasons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue