fix menu visibility
This commit is contained in:
@@ -14,11 +14,11 @@
|
|||||||
<menu id="kodi.core.main">
|
<menu id="kodi.core.main">
|
||||||
<item library="updatetvshow.py">
|
<item library="updatetvshow.py">
|
||||||
<label>70269</label>
|
<label>70269</label>
|
||||||
<visible>String.IsEqual(ListItem.dbtype,tvshow)</visible>
|
<visible>String.StartsWith(Container.FolderPath, 'plugin://plugin.video.kod/') + String.IsEqual(ListItem.dbtype,tvshow)</visible>
|
||||||
</item>
|
</item>
|
||||||
<item library="externalsearch.py">
|
<item library="externalsearch.py">
|
||||||
<label>90001</label>
|
<label>90001</label>
|
||||||
<visible>String.IsEqual(ListItem.dbtype,tvshow) | String.IsEqual(ListItem.dbtype,movie)</visible>
|
<visible>!String.StartsWith(Container.FolderPath, 'plugin://plugin.video.kod/') + String.IsEqual(ListItem.dbtype,tvshow) | String.IsEqual(ListItem.dbtype,movie)</visible>
|
||||||
</item>
|
</item>
|
||||||
</menu>
|
</menu>
|
||||||
</extension>
|
</extension>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ sys.path.insert(0, librerias)
|
|||||||
from core import tmdb
|
from core import tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
|
|
||||||
|
__addon__ = config.get_addon_core()
|
||||||
|
addon_name = __addon__.getAddonInfo('name')
|
||||||
|
|
||||||
def execute_search():
|
def execute_search():
|
||||||
"""
|
"""
|
||||||
@@ -25,8 +27,6 @@ def execute_search():
|
|||||||
# ADDON: maybe can we know if the current windows is related to a specific addon?
|
# ADDON: maybe can we know if the current windows is related to a specific addon?
|
||||||
# we could skip the ContextMenu if we already are in KOD's window
|
# we could skip the ContextMenu if we already are in KOD's window
|
||||||
#
|
#
|
||||||
# addon = xbmc.getInfoLabel('ListItem.Property(Addon.ID)')
|
|
||||||
|
|
||||||
|
|
||||||
tmdbid = xbmc.getInfoLabel('ListItem.Property(tmdb_id)')
|
tmdbid = xbmc.getInfoLabel('ListItem.Property(tmdb_id)')
|
||||||
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
|
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
|
||||||
@@ -34,6 +34,7 @@ def execute_search():
|
|||||||
year = xbmc.getInfoLabel('ListItem.Year')
|
year = xbmc.getInfoLabel('ListItem.Year')
|
||||||
imdb = xbmc.getInfoLabel('ListItem.IMDBNumber')
|
imdb = xbmc.getInfoLabel('ListItem.IMDBNumber')
|
||||||
|
|
||||||
|
|
||||||
logstr = "Selected ListItem is: 'IMDB: {}' - TMDB: {}' - 'Title: {}' - 'Year: {}'' - 'Type: {}'".format(imdb, tmdbid, title, year, mediatype)
|
logstr = "Selected ListItem is: 'IMDB: {}' - TMDB: {}' - 'Title: {}' - 'Year: {}'' - 'Type: {}'".format(imdb, tmdbid, title, year, mediatype)
|
||||||
logger.info(logstr)
|
logger.info(logstr)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user