aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHaraldNordgren <haraldnordgren@gmail.com>2026-10-13 13:36:13 -0400
committerBond_009 <bond.009@outlook.com>2026-10-13 13:36:13 -0400
commit34768404f7df0bd881ec853c8e5eb4489891688d (patch)
treeb21203da6d62538611f55d647dfc603117a58f4b /tests
parentf624cb4cc54826d4fc5c56dc2de9120a0ea632ce (diff)
Backport pull request #18343 from jellyfin/release-12.z
Treat a year off by one as a tie in TMDb result ranking Original-merge: 2002095e0fcb88c8fc504b612aed39413eb3d323 Merged-by: crobibero <cody@robibe.ro> Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Providers.Tests/Tmdb/TmdbUtilsTests.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Jellyfin.Providers.Tests/Tmdb/TmdbUtilsTests.cs b/tests/Jellyfin.Providers.Tests/Tmdb/TmdbUtilsTests.cs
index 8342621d97..6e36c08064 100644
--- a/tests/Jellyfin.Providers.Tests/Tmdb/TmdbUtilsTests.cs
+++ b/tests/Jellyfin.Providers.Tests/Tmdb/TmdbUtilsTests.cs
@@ -219,6 +219,19 @@ namespace Jellyfin.Providers.Tests.Tmdb
[Movie(1, "Some Movie", "Some Movie", 2015), Movie(2, "Some Movie", "Some Movie", 2010)],
2
},
+ // M. Night Shyamalan's Split premiered at a festival in 2016 and was released in 2017, so the obscure
+ // 2016 film of the same name must not outrank it. Years one apart tie and TMDb's own ordering decides.
+ {
+ "Split (2016)", "Split", 2016,
+ [Movie(381288, "Split", "Split", 2017), Movie(358364, "Split", "Split", 2016)],
+ 381288
+ },
+ // Two years apart is a different film, so the tie only covers a year off by one.
+ {
+ "Two years apart", "Some Movie", 2016,
+ [Movie(1, "Some Movie", "Some Movie", 2018), Movie(2, "Some Movie", "Some Movie", 2016)],
+ 2
+ },
// Nothing matches the name, so TMDb's own ordering is kept.
{
"A Christmas No. 1 (2021)", "A Christmas No. 1", 2021,