Custom context menu items not working in Kodi 19
#1
Hi,

I am developing addon and recently I added support for Kodi 16,17,18,19 and I have one issue in Kodi 19 that I cannot solve.

All items that are added with method
xml:
def addContextMenuItems(self, items, replaceItems=False):

do nothing. It is only version where it is not working. I also cannot find anything particular in logs.
Quote:2020-08-25 15:07:18.032 T:54404   DEBUG <general>: ------ Window Init (DialogContextMenu.xml) ------
2020-08-25 15:07:18.739 T:54404   DEBUG <general>: CInputManager:TonguerocessMouse: trying mouse action leftclick
2020-08-25 15:07:18.983 T:54404   DEBUG <general>: ------ Window Deinit (DialogContextMenu.xml) ------
Sometimes this WARNING appears:
Quote:2020-08-25 15:00:48.868 T:54404 WARNING <general>: CGUIWindowManager - CGUIWindowManager::HandleAction - ignoring action 107, because topmost modal dialog closing animation is running
but thats all. 

I tried other Kodi 19 compatible addon if context menu works there and it worked fine. So I am wondering what can be wrong? Is there some property that needs to be set in order to make custom menu items work? I tried to add random items with any builtin action and nothing was happening. There is no difference between closing dialog by going back or clicking some action in in.
Reply
#2
(2020-08-25, 15:17)LadaB Wrote: All items that are added with method

def addContextMenuItems(self, items, replaceItems=False):


@LadaB
The syntax=XML (pop-up box), then add your code between the tags when created in your post. Button 25
Image
Reply
#3
had the same problem with my addons. in my case the problem was my action definition. i changed

Code:
context_options = [("Trailer", "XBMC.RunPlugin(%s)" % plugin.url_for(show_trailer, movie.id))]

to 

Code:
context_options = [("Trailer", "RunPlugin(%s)" % plugin.url_for(show_trailer, movie.id))]

now the context menus are working fine for me on Kodi 19
Reply

Logout Mark Read Team Forum Stats Members Help
Custom context menu items not working in Kodi 190