2023-05-09, 18:34
The context menus on video files have more options than I want for a simplistic interface for my parents. I want to get rid of "Set content", "Rename", "Add to favourites" "queue item" and maybe more (but keep Play, Resume, Delete).
Googling tells me these menus are hard coded and can't be modified easily (Kodi 20), but I wonder if I can use the <visible> tag in the DialogContextMenu.xml button template area to dynamically exclude certain buttons based on their Label? I was thinking of adding something like
<visible>string.equals(ListItem.Label, 'Play')</visible>
to the "button template" area in that file (with multiple options for the items I want), but it doesn't work. Is there any usable trick to hide context menu items without having to recompile kodi source code?
Example popup context menus: https://i.imgur.com/fu8J6h6.jpg
Googling tells me these menus are hard coded and can't be modified easily (Kodi 20), but I wonder if I can use the <visible> tag in the DialogContextMenu.xml button template area to dynamically exclude certain buttons based on their Label? I was thinking of adding something like
<visible>string.equals(ListItem.Label, 'Play')</visible>
to the "button template" area in that file (with multiple options for the items I want), but it doesn't work. Is there any usable trick to hide context menu items without having to recompile kodi source code?
Example popup context menus: https://i.imgur.com/fu8J6h6.jpg