Migliorie contextmenu

This commit is contained in:
Alhaziel01
2022-08-20 11:32:22 +02:00
parent 5383448d44
commit f590067983
3 changed files with 26 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
[
"platformcode.contextmenu.search",
"platformcode.contextmenu.tvshow_options",
"platformcode.contextmenu.trailer"
"platformcode.contextmenu.trailer",
"platformcode.contextmenu.show_servers"
]

View File

@@ -0,0 +1,23 @@
import xbmc
from core.item import Item
from platformcode import config
def get_menu_items():
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
filePath = xbmc.getInfoLabel('ListItem.FileNameAndPath')
res = []
if 'kod' in filePath and mediatype in ['movie', 'episode'] and config.get_setting('autoplay'):
res = [(config.get_localized_string(70192), execute)]
return res
def execute():
from core import filetools
from platformcode.launcher import run
filePath = xbmc.getInfoLabel('ListItem.FileNameAndPath')
item = Item().fromurl(filetools.read(filePath))
item.disableAutoplay = True
run(item)