Fixed: Preserve insertion order for pinned and live items#1940
Open
oliv3r wants to merge 1 commit intoretrospect-addon:masterfrom
Open
Fixed: Preserve insertion order for pinned and live items#1940oliv3r wants to merge 1 commit intoretrospect-addon:masterfrom
oliv3r wants to merge 1 commit intoretrospect-addon:masterfrom
Conversation
ef3e368 to
81fc97b
Compare
basrieter
reviewed
Mar 17, 2026
| is_search = self.parameter_parser.action == action.SEARCH | ||
| if is_search: | ||
| is_live = items and all(i.isLive for i in items if i.is_playable) | ||
| has_pinned = items and any(i.dontGroup for i in items) |
Collaborator
There was a problem hiding this comment.
The dontGroup is not something that pins items. It just makes them not group if grouping is configured. So the is no reason to do this check. There is no real option to pin items to the top in Kodi or exclude them from sorting. I usually prepend \a or \b for items I want that the top.
The live items do make sense.
Contributor
Author
There was a problem hiding this comment.
sure, sorry; this should fix it.
03f9fc1 to
04f801e
Compare
Without SORT_METHOD_UNSORTED as default, Kodi sorts alphabetically. This reorders pinned items (search, explore pages) meant to stay at fixed positions and shuffles live channel listings out of EPG order. Make SORT_METHOD_UNSORTED the default sort method when any pinned or live items are present, matching the existing search behavior. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Without SORT_METHOD_UNSORTED as default, Kodi sorts alphabetically. This reorders pinned items (search, explore pages) meant to stay at fixed positions and shuffles live channel listings out of EPG order.