mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-19 06:00:41 +01:00
Merge branch 'master' of https://github.com/JadedRain/jellyfin
This commit is contained in:
@@ -7,23 +7,38 @@ public class SeasonPathParserTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("/Drive/Season 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEASON 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Staffel 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/STAFFEL 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Stagione 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/STAGIONE 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/sæson 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SÆSON 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Temporada 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/TEMPORADA 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/series 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SERIES 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Kausi 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/KAUSI 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Säsong 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SÄSONG 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Seizoen 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEIZOEN 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Seasong 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEASONG 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Sezon 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEZON 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/sezona 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEZONA 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/sezóna 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEZÓNA 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Sezonul 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/SEZONUL 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/시즌 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/シーズン 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/сезон 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Сезон 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/СЕЗОН 1", "/Drive", 1, true)]
|
||||
[InlineData("/Drive/Season 10", "/Drive", 10, true)]
|
||||
[InlineData("/Drive/Season 100", "/Drive", 100, true)]
|
||||
[InlineData("/Drive/s1", "/Drive", 1, true)]
|
||||
@@ -46,8 +61,14 @@ public class SeasonPathParserTests
|
||||
[InlineData("/Drive/s06e05", "/Drive", null, false)]
|
||||
[InlineData("/Drive/The.Legend.of.Condor.Heroes.2017.V2.web-dl.1080p.h264.aac-hdctv", "/Drive", null, false)]
|
||||
[InlineData("/Drive/extras", "/Drive", 0, true)]
|
||||
[InlineData("/Drive/EXTRAS", "/Drive", 0, true)]
|
||||
[InlineData("/Drive/specials", "/Drive", 0, true)]
|
||||
[InlineData("/Drive/SPECIALS", "/Drive", 0, true)]
|
||||
[InlineData("/Drive/Episode 1 Season 2", "/Drive", null, false)]
|
||||
[InlineData("/Drive/Episode 1 SEASON 2", "/Drive", null, false)]
|
||||
[InlineData("/media/YouTube/Devyn Johnston/2024-01-24 4070 Ti SUPER in under 7 minutes", "/media/YouTube/Devyn Johnston", null, false)]
|
||||
[InlineData("/media/YouTube/Devyn Johnston/2025-01-28 5090 vs 2 SFF Cases", "/media/YouTube/Devyn Johnston", null, false)]
|
||||
[InlineData("/Drive/202401244070", "/Drive", null, false)]
|
||||
public void GetSeasonNumberFromPathTest(string path, string? parentPath, int? seasonNumber, bool isSeasonDirectory)
|
||||
{
|
||||
var result = SeasonPathParser.Parse(path, parentPath, true, true);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user