Migliorie contextmenu
This commit is contained in:
+1
-13
@@ -43,14 +43,6 @@ def build_menu():
|
||||
contextmenuitems.extend([item for item, fn in module_item_actions])
|
||||
contextmenuactions.extend([fn for item, fn in module_item_actions])
|
||||
|
||||
if 'kod' in filePath and mediatype in ['movie', 'episode'] and config.get_setting('autoplay'):
|
||||
logger.debug('Add Select server menu item')
|
||||
contextmenuitems.append(config.get_localized_string(70192))
|
||||
from core import filetools
|
||||
item = Item().fromurl(filetools.read(filePath))
|
||||
item.disableAutoplay = True
|
||||
contextmenuactions.append(item)
|
||||
|
||||
if len(contextmenuitems) == 0:
|
||||
logger.debug('No contextmodule found, build an empty one')
|
||||
contextmenuitems.append(empty_item())
|
||||
@@ -60,11 +52,7 @@ def build_menu():
|
||||
|
||||
if ret > -1:
|
||||
logger.debug('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
|
||||
if type(contextmenuactions[ret]) == Item:
|
||||
from platformcode.launcher import run
|
||||
run(contextmenuactions[ret])
|
||||
else:
|
||||
contextmenuactions[ret]()
|
||||
contextmenuactions[ret]()
|
||||
|
||||
|
||||
def empty_item():
|
||||
|
||||
Reference in New Issue
Block a user