Fix Riproduzione
This commit is contained in:
@@ -1776,12 +1776,7 @@ def set_played_time(item):
|
|||||||
def prevent_busy(item):
|
def prevent_busy(item):
|
||||||
logger.debug()
|
logger.debug()
|
||||||
if not item.autoplay and not item.window:
|
if not item.autoplay and not item.window:
|
||||||
if item.action == 'play_from_library': xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
if item.globalsearch: xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
|
||||||
else: xbmc.Player().play(os.path.join(config.get_runtime_path(), "resources", "kod.mp4"))
|
else: xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, xbmcgui.ListItem(path=os.path.join(config.get_runtime_path(), "resources", "kod.mp4")))
|
||||||
# first wait the fake video to start
|
|
||||||
while not is_playing():
|
|
||||||
xbmc.sleep(10)
|
|
||||||
# then wait a little more
|
|
||||||
xbmc.sleep(200)
|
xbmc.sleep(200)
|
||||||
# and then stop it
|
|
||||||
xbmc.Player().stop()
|
xbmc.Player().stop()
|
||||||
|
|||||||
@@ -26,11 +26,10 @@ def mark_auto_as_watched(item):
|
|||||||
actual_time = 0
|
actual_time = 0
|
||||||
total_time = 0
|
total_time = 0
|
||||||
|
|
||||||
time_limit = time.time() + 30
|
time_limit = time.time() + 10
|
||||||
while not platformtools.is_playing() and time.time() < time_limit:
|
while not platformtools.is_playing() and time.time() < time_limit:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
marked = False
|
marked = False
|
||||||
sync = False
|
sync = False
|
||||||
next_episode = None
|
next_episode = None
|
||||||
@@ -38,6 +37,7 @@ def mark_auto_as_watched(item):
|
|||||||
|
|
||||||
percentage = float(config.get_setting("watched_setting")) / 100
|
percentage = float(config.get_setting("watched_setting")) / 100
|
||||||
time_from_end = config.get_setting('next_ep_seconds')
|
time_from_end = config.get_setting('next_ep_seconds')
|
||||||
|
|
||||||
if item.contentType != 'movie' and 0 < config.get_setting('next_ep') < 3:
|
if item.contentType != 'movie' and 0 < config.get_setting('next_ep') < 3:
|
||||||
next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml']
|
next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml']
|
||||||
next_ep_type = config.get_setting('next_ep_type')
|
next_ep_type = config.get_setting('next_ep_type')
|
||||||
@@ -46,7 +46,8 @@ def mark_auto_as_watched(item):
|
|||||||
except: next_episode = False
|
except: next_episode = False
|
||||||
logger.debug(next_episode)
|
logger.debug(next_episode)
|
||||||
|
|
||||||
while platformtools.is_playing():
|
while not xbmc.Monitor().abortRequested():
|
||||||
|
if not platformtools.is_playing(): break
|
||||||
try: actual_time = xbmc.Player().getTime()
|
try: actual_time = xbmc.Player().getTime()
|
||||||
except: pass
|
except: pass
|
||||||
try: total_time = xbmc.Player().getTotalTime()
|
try: total_time = xbmc.Player().getTotalTime()
|
||||||
@@ -113,6 +114,7 @@ def mark_auto_as_watched(item):
|
|||||||
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()
|
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def sync_trakt_addon(path_folder):
|
def sync_trakt_addon(path_folder):
|
||||||
"""
|
"""
|
||||||
Updates the values of episodes seen if
|
Updates the values of episodes seen if
|
||||||
|
|||||||
@@ -789,7 +789,7 @@ class SearchWindow(xbmcgui.WindowXML):
|
|||||||
|
|
||||||
|
|
||||||
def play(self, server=None):
|
def play(self, server=None):
|
||||||
server.globalsearch = True
|
|
||||||
platformtools.prevent_busy(server)
|
platformtools.prevent_busy(server)
|
||||||
server.window = True
|
server.window = True
|
||||||
|
server.globalsearch = True
|
||||||
return run(server)
|
return run(server)
|
||||||
|
|||||||
Reference in New Issue
Block a user