Fix comments not using correct sort methods

- Allow any content sub-type to set sort methods regardless of main type
This commit is contained in:
MoojMidge 2025-10-26 11:49:12 +11:00
parent a989752ad8
commit 23282aa51d

View file

@ -711,31 +711,30 @@ class XbmcContext(AbstractContext):
xbmcplugin.setPluginCategory(self._plugin_handle, category_label)
detailed_labels = self.get_settings().show_detailed_labels()
if content_type == CONTENT.VIDEO_CONTENT:
if sub_type == CONTENT.HISTORY:
self.add_sort_method(
SORT.HISTORY_CONTENT_DETAILED
if detailed_labels else
SORT.HISTORY_CONTENT_SIMPLE
)
elif sub_type == CONTENT.COMMENTS:
self.add_sort_method(
SORT.COMMENTS_CONTENT_DETAILED
if detailed_labels else
SORT.COMMENTS_CONTENT_SIMPLE
)
elif sub_type == CONTENT.PLAYLIST:
self.add_sort_method(
SORT.PLAYLIST_CONTENT_DETAILED
if detailed_labels else
SORT.PLAYLIST_CONTENT_SIMPLE
)
else:
self.add_sort_method(
SORT.VIDEO_CONTENT_DETAILED
if detailed_labels else
SORT.VIDEO_CONTENT_SIMPLE
)
if sub_type == CONTENT.HISTORY:
self.add_sort_method(
SORT.HISTORY_CONTENT_DETAILED
if detailed_labels else
SORT.HISTORY_CONTENT_SIMPLE
)
elif sub_type == CONTENT.COMMENTS:
self.add_sort_method(
SORT.COMMENTS_CONTENT_DETAILED
if detailed_labels else
SORT.COMMENTS_CONTENT_SIMPLE
)
elif sub_type == CONTENT.PLAYLIST:
self.add_sort_method(
SORT.PLAYLIST_CONTENT_DETAILED
if detailed_labels else
SORT.PLAYLIST_CONTENT_SIMPLE
)
elif content_type == CONTENT.VIDEO_CONTENT:
self.add_sort_method(
SORT.VIDEO_CONTENT_DETAILED
if detailed_labels else
SORT.VIDEO_CONTENT_SIMPLE
)
else:
self.add_sort_method(
SORT.LIST_CONTENT_DETAILED