From 019e0bae20c7a189d00825c1e96c1200f0844acd Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Sat, 14 Sep 2024 02:52:26 +1000 Subject: [PATCH] Revert old workaround for Kodi treating a non-folder listitem as playable --- .../kodion/items/xbmc/xbmc_items.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py b/resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py index f7396f929..2c9c6aa26 100644 --- a/resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py +++ b/resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py @@ -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: