KoD 1.7.6

- fix di routine ai canali/server\n- disabilitati cb01anime e tantifilm\n- aggiunta opzione mostra server nel menu contestuale della libreria\n- più opzioni per quanto riguarda l'aggiornamento della videoteca\n\n
This commit is contained in:
marco
2022-09-15 19:15:51 +02:00
parent 749b54a772
commit 164efd8af7
41 changed files with 1062 additions and 941 deletions
+9 -6
View File
@@ -1,10 +1,12 @@
from platformcode import config, logger
import xbmc, sys, xbmcgui, os
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
sys.path.insert(0, librerias)
from core import jsontools, support
from core.item import Item
addon_id = config.get_addon_core().getAddonInfo('id')
@@ -15,6 +17,7 @@ f.close()
def build_menu():
# from core.support import dbg;dbg()
tmdbid = xbmc.getInfoLabel('ListItem.Property(tmdb_id)')
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
title = xbmc.getInfoLabel('ListItem.Title')
@@ -24,9 +27,9 @@ def build_menu():
containerPath = xbmc.getInfoLabel('Container.FolderPath')
logstr = "Selected ListItem is: 'IMDB: {}' - TMDB: {}' - 'Title: {}' - 'Year: {}'' - 'Type: {}'".format(imdb, tmdbid, title, year, mediatype)
logger.info(logstr)
logger.info(filePath)
logger.info(containerPath)
logger.debug(logstr)
logger.debug(filePath)
logger.debug(containerPath)
contextmenuitems = []
contextmenuactions = []
@@ -35,20 +38,20 @@ def build_menu():
logger.debug('check contextmenu', itemmodule)
module = __import__(itemmodule, None, None, [itemmodule])
logger.info('Add contextmenu item ->', itemmodule)
logger.debug('Add contextmenu item ->', itemmodule)
module_item_actions = module.get_menu_items()
contextmenuitems.extend([item for item, fn in module_item_actions])
contextmenuactions.extend([fn for item, fn in module_item_actions])
if len(contextmenuitems) == 0:
logger.info('No contextmodule found, build an empty one')
logger.debug('No contextmodule found, build an empty one')
contextmenuitems.append(empty_item())
contextmenuactions.append(lambda: None)
ret = xbmcgui.Dialog().contextmenu(contextmenuitems)
if ret > -1:
logger.info('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
logger.debug('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
contextmenuactions[ret]()