mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 22:17:25 -04:00
Merge pull request #5979 from Ullmie02/nfo-fanart
Add support for fanart aspect in thumb tag
This commit is contained in:
commit
04447ed014
3 changed files with 7 additions and 2 deletions
|
@ -1333,6 +1333,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
"discart" => ImageType.Disc,
|
||||
"landscape" => ImageType.Thumb,
|
||||
"clearart" => ImageType.Art,
|
||||
"fanart" => ImageType.Backdrop,
|
||||
// unknown type (including "poster") --> primary
|
||||
_ => ImageType.Primary,
|
||||
};
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
|
|||
Assert.Equal("Justice League Collection", item.CollectionName);
|
||||
|
||||
// Images
|
||||
Assert.Equal(6, result.RemoteImages.Count);
|
||||
Assert.Equal(7, result.RemoteImages.Count);
|
||||
|
||||
var posters = result.RemoteImages.Where(x => x.type == ImageType.Primary).ToList();
|
||||
Assert.Single(posters);
|
||||
|
@ -182,6 +182,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
|
|||
Assert.Single(discArt);
|
||||
Assert.Equal("https://assets.fanart.tv/fanart/movies/141052/moviedisc/justice-league-5a3af26360617.png", discArt[0].url);
|
||||
|
||||
var backdrop = result.RemoteImages.Where(x => x.type == ImageType.Backdrop).ToList();
|
||||
Assert.Single(backdrop);
|
||||
Assert.Equal("https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5793f518c6d6e.jpg", backdrop[0].url);
|
||||
|
||||
// Local Image - contains only one item depending on operating system
|
||||
Assert.Single(result.Images);
|
||||
Assert.Equal(_localImageFileMetadata.Name, result.Images[0].FileInfo.Name);
|
||||
|
|
|
@ -82,8 +82,8 @@
|
|||
<thumb aspect="discart" preview="https://assets.fanart.tv/preview/movies/141052/moviedisc/justice-league-5a0b913c233be.png">https://assets.fanart.tv/fanart/movies/141052/moviedisc/justice-league-5a0b913c233be.png</thumb>
|
||||
<thumb aspect="discart" preview="https://assets.fanart.tv/preview/movies/141052/moviedisc/justice-league-5a87e0cdb1209.png">https://assets.fanart.tv/fanart/movies/141052/moviedisc/justice-league-5a87e0cdb1209.png</thumb>
|
||||
<thumb aspect="discart" preview="https://assets.fanart.tv/preview/movies/141052/moviedisc/justice-league-59dc595362ef1.png">https://assets.fanart.tv/fanart/movies/141052/moviedisc/justice-league-59dc595362ef1.png</thumb>
|
||||
<thumb aspect="fanart">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5793f518c6d6e.jpg</thumb>
|
||||
<fanart>
|
||||
<thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5793f518c6d6e.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5793f518c6d6e.jpg</thumb>
|
||||
<thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5a5332c7b5e77.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5a5332c7b5e77.jpg</thumb>
|
||||
<thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5a53cf2dac1c8.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5a53cf2dac1c8.jpg</thumb>
|
||||
<thumb preview="https://assets.fanart.tv/preview/movies/141052/moviebackground/justice-league-5976ba93eb5d3.jpg">https://assets.fanart.tv/fanart/movies/141052/moviebackground/justice-league-5976ba93eb5d3.jpg</thumb>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue