From 8184ecf1cebab66b0cbdd02b0f4b0de157f04289 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 23 Dec 2020 16:24:17 +0100 Subject: [PATCH] Piccoli ritocchi alla riproduzione --- platformcode/launcher.py | 9 ++++----- platformcode/platformtools.py | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 49a0ec67..e578b4c7 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -463,21 +463,21 @@ def play_from_library(item): logger.debug() # logger.debug("item: \n" + item.tostring('\n')) - # Try to reproduce an image (this does nothing and also does not give an error) - platformtools.prevent_busy(item) - - # Modify the action (currently the video library needs "findvideos" since this is where the sources are searched + # Modify the action (currently the video library needs "findvideos" since this is where the sources are searched item.action = "findvideos" window_type = config.get_setting("window_type", "videolibrary") # and launch kodi again if xbmc.getCondVisibility('Window.IsMedia') and not window_type == 1: + xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) + xbmc.Player().stop() # Conventional window item.window = True xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")") else: # Pop-up window + # platformtools.prevent_busy(item) from specials import videolibrary p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683)) p_dialog.update(0, '') @@ -490,7 +490,6 @@ def play_from_library(item): if nfo_path and filetools.isfile(nfo_path): from core import videolibrarytools head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path) - item_nfo.window = True played_time = platformtools.get_played_time(item_nfo) else: played_time = 0 diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 81e9b0de..9ac807b8 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -24,13 +24,13 @@ from platformcode import logger, config addon = config.__settings__ addon_icon = os.path.join( addon.getAddonInfo( "path" ),'resources', 'media', "logo.png" ) -class XBMCPlayer(xbmc.Player): +# class XBMCPlayer(xbmc.Player): - def __init__(self, *args): - pass +# def __init__(self, *args): +# pass -xbmc_player = XBMCPlayer() +xbmc_player = xbmc.Player() def dialog_ok(heading, message):