aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortheguymadmax <171496228+theguymadmax@users.noreply.github.com>2025-11-17 14:08:54 -0500
committerBond_009 <bond.009@outlook.com>2025-11-17 14:08:54 -0500
commit6c5f44878756414716b553cf66767a988816a2a8 (patch)
treed01b2d4ccee56fa88d5f1482d022578890e5f9e0 /tests
parentf848b8f12cc410ca5e8516762a8465280da8974d (diff)
Backport pull request #15404 from jellyfin/release-10.11.z
Improve season folder parsing Original-merge: 2e5ced50986c37b19b5f4ef34d730fc56a51535a Merged-by: crobibero <cody@robibe.ro> Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Naming.Tests/TV/SeasonPathParserTests.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Jellyfin.Naming.Tests/TV/SeasonPathParserTests.cs b/tests/Jellyfin.Naming.Tests/TV/SeasonPathParserTests.cs
index 0c3671f4f..4dbe769bf 100644
--- a/tests/Jellyfin.Naming.Tests/TV/SeasonPathParserTests.cs
+++ b/tests/Jellyfin.Naming.Tests/TV/SeasonPathParserTests.cs
@@ -69,6 +69,12 @@ public class SeasonPathParserTests
[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)]
+ [InlineData("/Drive/Drive.S01.2160p.WEB-DL.DDP5.1.H.265-XXXX", "/Drive", 1, true)]
+ [InlineData("The Wonder Years/The.Wonder.Years.S04.1080p.PDTV.x264-JCH", "/The Wonder Years", 4, true)]
+ [InlineData("The Wonder Years/[The.Wonder.Years.S04.1080p.PDTV.x264-JCH]", "/The Wonder Years", 4, true)]
+ [InlineData("The Wonder Years/The.Wonder.Years [S04][1080p.PDTV.x264-JCH]", "/The Wonder Years", 4, true)]
+ [InlineData("The Wonder Years/The Wonder Years Season 01 1080p", "/The Wonder Years", 1, true)]
+
public void GetSeasonNumberFromPathTest(string path, string? parentPath, int? seasonNumber, bool isSeasonDirectory)
{
var result = SeasonPathParser.Parse(path, parentPath, true, true);