-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort by version name before resolution sorting #12621
Conversation
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
This reverts commit ad9afab.
Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be simplified further: if ResolutionRegex returns an empty string for resolution-less versions, we can remove the grouping.
But it LGTM.
|
I wonder why the sorting result is different from your instance and the unit test... it does not make many sense to me tbh |
|
|
|
So current sorting is correct and the intended behavior right? |
|
Then probably we should not hijack this PR to extend its scope because what you pointed out is something that having a much deeper impact. When we are fetching mediastreams for everything we always sort by width if available and that is in the very cursed jellyfin/MediaBrowser.Controller/Entities/BaseItem.cs Lines 1090 to 1095 in c67b78b
Which means the prober correctly sorted things, but the reader just sorted it again. I prefer to make a separate PR for that because that one may contain more unwanted side effects. |
|
This PR does fix the issue, thank you. Hopefully, there will be a PR to address the other issue as well, rather than just changing the documentation, which is understandable. As it stands now, there is no way for users to sort alternative versions without considering video resolution when the resolutions vary between files. |
It up: #12626 |



Changes
We need to sort by resolution in descending order so that higher resolutions are listed first in the alternate version menu. However, we currently do not consider sorting when the resolutions are the same, leading to unwanted descending order for supplemental titles. This sorts the titles additionally after the resolution, providing a more natural listing.
Issues
Closes #12620
Fixes #12618