mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-06 10:06:11 +01:00
add test for new uniqueid nfo key normalisation
This commit is contained in:
parent
b3b9f74014
commit
e28d547006
2 changed files with 20 additions and 0 deletions
|
|
@ -275,5 +275,24 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
|
|||
Assert.StartsWith(">>", item.Overview, StringComparison.InvariantCulture);
|
||||
Assert.EndsWith("<<", item.Overview, StringComparison.InvariantCulture);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Parse_TmdbcolUniqueId_NormalizedToTmdbCollection()
|
||||
{
|
||||
var result = new MetadataResult<Video>()
|
||||
{
|
||||
Item = new Movie()
|
||||
};
|
||||
|
||||
_parser.Fetch(result, "Test Data/Lilo & Stitch.nfo", CancellationToken.None);
|
||||
var item = (Movie)result.Item;
|
||||
|
||||
// Verify that <uniqueid type="tmdbcol"> is normalized to TmdbCollection
|
||||
Assert.True(item.ProviderIds.ContainsKey(MetadataProvider.TmdbCollection.ToString()));
|
||||
Assert.Equal("97020", item.ProviderIds[MetadataProvider.TmdbCollection.ToString()]);
|
||||
|
||||
// Verify that the lowercase "tmdbcol" is NOT in the provider IDs
|
||||
Assert.False(item.ProviderIds.ContainsKey("tmdbcol"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<movie>
|
||||
<title>Lilo & Stitch</title>
|
||||
<originaltitle>Lilo & Stitch</originaltitle>
|
||||
<uniqueid type="tmdbcol" default="false">97020</uniqueid>
|
||||
<set>Lilo & Stitch Collection</set>
|
||||
<plot>>>As Stitch, a runaway genetic experiment from a faraway planet, wreaks havoc on the Hawaiian Islands, he becomes the mischievous adopted alien "puppy" of an independent little girl named Lilo and learns about loyalty, friendship, and ʻohana, the Hawaiian tradition of family.<<</plot>
|
||||
</movie>
|
||||
|
|
|
|||
Loading…
Reference in a new issue