From 6e4aec0ab91f9c3635a17fdccc4f920eebb63387 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Tue, 2 Nov 2021 21:40:20 +0100 Subject: [PATCH] Prova riproduzione --- core/support.py | 4 ++-- platformcode/launcher.py | 8 +++++++- platformcode/xbmc_videolibrary.py | 2 -- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core/support.py b/core/support.py index 5916759c..c5c69e26 100755 --- a/core/support.py +++ b/core/support.py @@ -1278,10 +1278,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru videoitem.server = videoitem.server.lower() if videoitem.video_urls or srv_param.get('active', False): - item.title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title + title = typo(item.contentTitle.strip(), 'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title quality = videoitem.quality if videoitem.quality else item.quality if item.quality else '' - videoitem.title = (item.title if item.channel not in ['url'] else '')\ + videoitem.title = (title if item.channel not in ['url'] else '')\ + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "")\ + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")\ + (typo(videoitem.contentLanguage, '_ color kod []') if videoitem.contentLanguage else "")\ diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 7b3af613..b90d8309 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -459,8 +459,14 @@ def play_from_library(item): from time import sleep # logger.debug("item: \n" + item.tostring('\n')) + xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, + xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) + while not platformtools.is_playing(): + xbmc.sleep(10) + xbmc.Player().stop() platformtools.prevent_busy() + itemlist=[] item.fromLibrary = True item.window = True @@ -531,7 +537,7 @@ def play_from_library(item): if selection == -1: return else: - item = videolibrary.play(itemlist[selection + selection_implementation])[0] + item = videolibrary.play(itemlist[selection + selection_implementation])[0] platformtools.play_video(item) reopen = True # if (platformtools.is_playing() and item.action) or item.server == 'torrent' or config.get_setting('autoplay'): break diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index 95888db4..a78ed16c 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -377,8 +377,6 @@ def set_watched_on_kod(data): path = filetools.join(path, filename) head_nfo, item = videolibrarytools.read_nfo(path) - from core.support import dbg - dbg() if item.library_playcounts: item.library_playcounts.update({title: playcount}) else: