In Kodi 16.1 we can replace context menu.
As rewrite was done to Kodi 17 there are “static” items.
My current plugins context menu in kodi 17b3 looks like this :
Quote:Play (do not mark as watched) – mine
More info <— mine
Vote for episode <— mine
Mark as Watched <— mine
Play <— build-in
Mark as watched <— build-in
Add to favorites <— build-in
And the question regardless this is:
1. Can I edit order of those Items ? as I would love to have build-in ‘Play’ have on top
2. Can I edit the commands under those “static items” as you can see I have two ‘Mark as watched’ because the build-in “ToggleWatched” is not enough for me – or is there a way to trigger custom action when ToggleWatched is detected, like having service in background that would trigger my custom action that is lunched at mine ‘mark as watched’? (that would resolve most of my problems with context menu)
Im adding context menu items like this:
liz = xbmcgui.ListItem(details.get('title', 'Unknown'))
context = []
context.append(('More Info', 'Action(Info)'))
context.append(('Mark as Watched (JMM)', 'RunScript(plugin.video.nakamori, %s, %s&cmd=watched)'
liz.addContextMenuItems(context)
xbmcplugin.addDirectoryItem(handle, url, listitem=liz, isFolder=folder)
Also I don’t mind extra/static items there but would love to be able to use them somehow.