From 2409f7db37b83b879c3d5b552ab70d45441d6495 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 27 Nov 2021 17:30:29 +0100 Subject: [PATCH] Fix Freeze e canali vuoti --- platformcode/launcher.py | 24 +++++++++++++----------- platformcode/platformtools.py | 3 ++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 19bb6e16..5c254d85 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -225,6 +225,7 @@ def run(item=None): from core import db if db['OnPlay'].get('addon', False): item.autoplay = True + db['OnPlay']['addon'] = False platformtools.fakeVideo() db.close() @@ -298,18 +299,19 @@ def run(item=None): platformtools.render_items(itemlist, item) - # For all other actions + # For all other actions else: - reload = False - from core import db - if db['OnPlay'].get('addon', False): - reload = True - db['OnPlay']['addon'] = False - db.close() - if reload: - platformtools.fakeVideo() - import xbmc - return xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")") + if item.channel == 'filmontv': + reload = False + from core import db + if db['OnPlay'].get('addon', False): + reload = True + db['OnPlay']['addon'] = False + db.close() + if reload: + platformtools.fakeVideo() + import xbmc + return xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")") logger.debug("Executing channel '%s' method" % item.action) itemlist = getattr(channel, item.action)(item) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 624eb23e..6e313834 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -1686,6 +1686,7 @@ def prevent_busy(item=None): def fakeVideo(): xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) + sleep = 200 if xbmc.getCondVisibility("system.platform.android") else 100 while not is_playing(): - xbmc.sleep(100) + xbmc.sleep(sleep) xbmc.Player().stop() \ No newline at end of file