Skip to content

Commit 0aee05b

Browse files
oliv3rclaude
andcommitted
Fixed: Preserve insertion order for pinned and live items
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>
1 parent 4717b9a commit 0aee05b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/lib/actions/folderaction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ def __add_sort_method_to_handle(self, handle, items=None):
314314
sort_methods.append(xbmcplugin.SORT_METHOD_EPISODE) # 24
315315

316316
is_search = self.parameter_parser.action == action.SEARCH
317-
if is_search:
317+
is_live = items and all(i.isLive for i in items if i.is_playable)
318+
if is_search or is_live:
318319
sort_methods.remove(xbmcplugin.SORT_METHOD_UNSORTED)
319320
sort_methods.insert(0, xbmcplugin.SORT_METHOD_UNSORTED)
320321

0 commit comments

Comments
 (0)