[PR #12626] [MERGED] Only sort item by width when they have the same path #13292

Closed
opened 2026-02-07 07:10:25 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12626
Author: @gnattu
Created: 9/11/2024
Status: Merged
Merged: 9/18/2024
Merged by: @crobibero

Base: masterHead: only-sort-when-path-same


📝 Commits (2)

  • ab1f98a Only sort item by width when they have the same path
  • 2cb6607 Better doc

📊 Changes

2 files changed (+57 additions, -6 deletions)

View changed files

📝 MediaBrowser.Controller/Entities/BaseItem.cs (+1 -6)
MediaBrowser.Controller/Entities/MediaSourceWidthComparator.cs (+56 -0)

📄 Description

Since emby era we are re-ordering all media sources by its width when reading from database. However, that would break the sorting made by the media prober when resolving multiple versions from different files. Only do such sorting when media streams share the same path to respect the filename based sorting done by the multi version resolver.

This should have little to no impact for most cases are most of the files will only have strictly one video stream.

Changes

Issues

Fixes #12129


🔄 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/12626 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 9/18/2024 **Merged by:** [@crobibero](https://github.com/crobibero) **Base:** `master` ← **Head:** `only-sort-when-path-same` --- ### 📝 Commits (2) - [`ab1f98a`](https://github.com/jellyfin/jellyfin/commit/ab1f98af6d9367e8ab218c06fa72bbd707611a97) Only sort item by width when they have the same path - [`2cb6607`](https://github.com/jellyfin/jellyfin/commit/2cb6607b034d565dcfa326bcd8f7f6b9d5ed3362) Better doc ### 📊 Changes **2 files changed** (+57 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Controller/Entities/BaseItem.cs` (+1 -6) ➕ `MediaBrowser.Controller/Entities/MediaSourceWidthComparator.cs` (+56 -0) </details> ### 📄 Description Since emby era we are re-ordering all media sources by its width when reading from database. However, that would break the sorting made by the media prober when resolving multiple versions from different files. Only do such sorting when media streams share the same path to respect the filename based sorting done by the multi version resolver. This should have little to no impact for most cases are most of the files will only have strictly one video stream. <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes #12129 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:10:25 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13292