Kodi Community Forum

Full Version: Best way for plugin list item that is not a folder and not playable?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a few items that are not a folder, and not playable.
eg. Login / Logout or Settings shortcut.

I have tried the below methods but all have some downside

Method 1:
isFolder = False, Playable=(not set or False).
This works pretty good except the list item still has a "Play / Mark as Watched" context menu items.
Maybe that is a bug?
If the user clicks Play, then you get an endless loading loop (KODI 18).
You also eventually get the "Failed to play" warning.
You also don't get a loading dialog while the action is doing it's work.

Method 2 (currently using):
isFolder = True, Playable(not set or False).
No Play context menu item = good.
But, once the plugin is called, you get an endless loading loop (KODI 18).
I need to add xbmcplugin.endOfDirectory with succeeded=False to fix that.
This causes a warning in the log.
If you use succeeded=True, then the plugin shows an empty directory.

KODI 18 seems to show this endless loading loop for any items marked as a Folder that don't have endOfDirectory called.
eg. if an error occurs during loading the content.
KODI 17 doesn't though.
What if you replace the context menu items in a) with an empty list?

listItem.addContextMenuItems([], replaceItems=True)

If this does not work please provide samples so anyone can debug
Thanks for the suggestion.

It looks like replaceItems was removed in Kodi 17 API
https://forum.kodi.tv/showthread.php?tid=270648
https://codedocs.xyz/AlwinEsch/kodi/grou...e23a1a78c2

I'll move convo over to that forum as it appears to be a bug
My bad, yes it was removed.
If you still find any bug please provide a PoC plugin which reproduces the error