Fix Freeze e canali vuoti

This commit is contained in:
Alhaziel01
2021-11-27 17:30:29 +01:00
parent d8d1e123ef
commit 2409f7db37
2 changed files with 15 additions and 12 deletions
+13 -11
View File
@@ -225,6 +225,7 @@ def run(item=None):
from core import db from core import db
if db['OnPlay'].get('addon', False): if db['OnPlay'].get('addon', False):
item.autoplay = True item.autoplay = True
db['OnPlay']['addon'] = False
platformtools.fakeVideo() platformtools.fakeVideo()
db.close() db.close()
@@ -298,18 +299,19 @@ def run(item=None):
platformtools.render_items(itemlist, item) platformtools.render_items(itemlist, item)
# For all other actions # For all other actions
else: else:
reload = False if item.channel == 'filmontv':
from core import db reload = False
if db['OnPlay'].get('addon', False): from core import db
reload = True if db['OnPlay'].get('addon', False):
db['OnPlay']['addon'] = False reload = True
db.close() db['OnPlay']['addon'] = False
if reload: db.close()
platformtools.fakeVideo() if reload:
import xbmc platformtools.fakeVideo()
return xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")") import xbmc
return xbmc.executebuiltin("Container.Update(" + sys.argv[0] + "?" + item.tourl() + ")")
logger.debug("Executing channel '%s' method" % item.action) logger.debug("Executing channel '%s' method" % item.action)
itemlist = getattr(channel, item.action)(item) itemlist = getattr(channel, item.action)(item)
+2 -1
View File
@@ -1686,6 +1686,7 @@ def prevent_busy(item=None):
def fakeVideo(): def fakeVideo():
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))) 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(): while not is_playing():
xbmc.sleep(100) xbmc.sleep(sleep)
xbmc.Player().stop() xbmc.Player().stop()