diff options
| author | theguymadmax <theguymadmax@proton.me> | 2025-10-01 23:10:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-01 21:10:31 -0600 |
| commit | 0f42aa892e0a7fe2ac4e680e7647515af0909e5e (patch) | |
| tree | 2fe37bfa507844af4dbe3fdf1b93f14c8c730bdd /MediaBrowser.Controller | |
| parent | cce6bf27e034b5cd7917242ad6eaa05a6414d7d9 (diff) | |
Fix BoxSet sorting (#14919)
Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 9950e7852..e62004510 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1351,6 +1351,14 @@ namespace MediaBrowser.Controller.Entities var realChildren = visibleChildren .Where(e => query is null || UserViewBuilder.FilterItem(e, query)) .ToArray(); + + if (this is BoxSet && (query.OrderBy is null || query.OrderBy.Count == 0)) + { + realChildren = realChildren + .OrderBy(e => e.ProductionYear ?? int.MaxValue) + .ToArray(); + } + var childCount = realChildren.Length; if (result.Count < limit) { |
