Remove context menu items in addon
#1
I have created simple addon for local radio stations...
and now i have added to addon.xml 2 items to centext menu
Quote:</extension> <extension point="kodi.context.item"> <menu id="kodi.core.main"> <item library="addToFav.py"> <label>30019</label> <visible>ListItem.Property(IsPlayable)</visible> </item> <item library="removeFav.py"> <label>30020</label> <visible>ListItem.Property(IsPlaylist)</visible> </item> </menu> </extension>
 
this is working fine but now i want remove all default items from context menu....and only my items will be in context menu

Code:
listitem.addContextMenuItems([('Context', 'RunScript(test.py)')])

this add to my context menu item Context but how can i run script from /resources/lib/test.py   ?
and how can i disable all default items in context menu?
Reply
#2
(2021-03-18, 20:49)ma_sk Wrote: I have created simple addon for local radio stations...
and now i have added to addon.xml 2 items to centext menu
Quote:</extension> <extension point="kodi.context.item"> <menu id="kodi.core.main"> <item library="addToFav.py"> <label>30019</label> <visible>ListItem.Property(IsPlayable)</visible> </item> <item library="removeFav.py"> <label>30020</label> <visible>ListItem.Property(IsPlaylist)</visible> </item> </menu> </extension>
 
this is working fine but now i want remove all default items from context menu....and only my items will be in context menu

Code:
listitem.addContextMenuItems([('Context', 'RunScript(test.py)')])

this add to my context menu item Context but how can i run script from /resources/lib/test.py   ?
and how can i disable all default items in context menu?
Based upon this thread removing context menu items from within an addon isn't possible.  I believe it was at one time but the functionality was removed.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#3
thanks
Reply
#4
(2021-03-19, 11:19)ma_sk Wrote: thanks

I too wish we could delete / modify existing context menu items from within an addon.  


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply

Logout Mark Read Team Forum Stats Members Help
Remove context menu items in addon0