Skip to content

Commit

Permalink
Revert old workaround for Kodi treating a non-folder listitem as play…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
MoojMidge committed Sep 13, 2024
1 parent 625af54 commit 019e0ba
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,15 +568,17 @@ def directory_listitem(context, directory_item, show_fanart=None, **_kwargs):
set_info(list_item, directory_item, props)

"""
# ListItems that do not open a lower level list should have the isFolder
# parameter of the xbmcplugin.addDirectoryItem set to False, however this
# now appears to mark the ListItem as playable, even if the IsPlayable
# property is not set or set to "false".
# Set isFolder to True as a workaround, regardless of whether the ListItem
# is actually a folder.
is_folder = not directory_item.is_action()
ListItems that do not open a lower level list should have the isFolder
parameter of the xbmcplugin.addDirectoryItem set to False, however this
now appears to mark the ListItem as playable, even if the IsPlayable
property is not set or set to "false".
Set isFolder to True as a workaround, regardless of whether the ListItem
is actually a folder.
"""
is_folder = True
# Workaround:
# is_folder = True
# Test correctly setting isFolder:
is_folder = not directory_item.is_action()

context_menu = directory_item.get_context_menu()
if context_menu is not None:
Expand Down

0 comments on commit 019e0ba

Please sign in to comment.