[PR #7548] [MERGED] Fix album index sorts #11269

Closed
opened 2025-12-22 08:38:46 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/7548
Author: @1337joe
Created: 4/3/2022
Status: Merged
Merged: 4/4/2022
Merged by: @crobibero

Base: release-10.8.zHead: comparer-null-fix


📝 Commits (1)

  • 0674f84 Add check so nulls will result in valid sort

📊 Changes

4 files changed (+109 additions, -0 deletions)

View changed files

📝 Emby.Server.Implementations/Sorting/IndexNumberComparer.cs (+5 -0)
📝 Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs (+5 -0)
tests/Jellyfin.Server.Implementations.Tests/Sorting/IndexNumberComparerTests.cs (+49 -0)
tests/Jellyfin.Server.Implementations.Tests/Sorting/ParentIndexNumberComparerTests.cs (+50 -0)

📄 Description

Given an album with over 16 tracks with null disc/track fields the sorters would fail because comparing null values tried to change order differently when called (a,b) vs (b,a).

Changes

  • Add check so nulls will result in valid sort

Issues
Fixes #7533
Fixes jellyfin/jellyfin-web#3532


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/7548 **Author:** [@1337joe](https://github.com/1337joe) **Created:** 4/3/2022 **Status:** ✅ Merged **Merged:** 4/4/2022 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `release-10.8.z` ← **Head:** `comparer-null-fix` --- ### 📝 Commits (1) - [`0674f84`](https://github.com/jellyfin/jellyfin/commit/0674f84e9ee3774a2a8dc03e78441bf3f116ceed) Add check so nulls will result in valid sort ### 📊 Changes **4 files changed** (+109 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Sorting/IndexNumberComparer.cs` (+5 -0) 📝 `Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs` (+5 -0) ➕ `tests/Jellyfin.Server.Implementations.Tests/Sorting/IndexNumberComparerTests.cs` (+49 -0) ➕ `tests/Jellyfin.Server.Implementations.Tests/Sorting/ParentIndexNumberComparerTests.cs` (+50 -0) </details> ### 📄 Description Given an album with over 16 tracks with null disc/track fields the sorters would fail because comparing null values tried to change order differently when called (a,b) vs (b,a). **Changes** - Add check so nulls will result in valid sort **Issues** Fixes #7533 Fixes jellyfin/jellyfin-web#3532 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 08:38:46 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#11269
No description provided.