diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/EpisodeNfoProviderTests.cs b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/EpisodeNfoProviderTests.cs index 3e726f23d9..073214083f 100644 --- a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/EpisodeNfoProviderTests.cs +++ b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/EpisodeNfoProviderTests.cs @@ -122,6 +122,20 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers Assert.Equal(2004, item.ProductionYear); } + [Fact] + public void Parse_GivenFileWithThumbWithoutAspect_Success() + { + var result = new MetadataResult() + { + Item = new Episode() + }; + + _parser.Fetch(result, "Test Data/Sonarr-Thumb.nfo", CancellationToken.None); + + Assert.Single(result.RemoteImages.Where(x => x.Type == ImageType.Primary)); + Assert.Equal("https://artworks.thetvdb.com/banners/episodes/359095/7081317.jpg", result.RemoteImages.First(x => x.Type == ImageType.Primary).Url); + } + [Fact] public void Fetch_WithNullItem_ThrowsArgumentException() { diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Sonarr-Thumb.nfo b/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Sonarr-Thumb.nfo new file mode 100644 index 0000000000..fb86768ef8 --- /dev/null +++ b/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Sonarr-Thumb.nfo @@ -0,0 +1,34 @@ + + Sometimes a Genius's Every Action Is at the Mercy of X + 1 + 8 + 2019-05-26 + After Nariyuki wins a smartphone in a lottery, he can't wait to use it for apps like the dictionary, schedule managing, and the like. He also learns that studying in the bathtub is effective and quickly puts the method into practice. + 4289 + https://artworks.thetvdb.com/banners/episodes/359095/7081317.jpg + false + + + + + + English + + + +