Fix mark_as_watched_subThread
This commit is contained in:
@@ -1234,7 +1234,8 @@ def resume_playback(played_time):
|
|||||||
if action in self.action_exitkeys_id:
|
if action in self.action_exitkeys_id:
|
||||||
self.set_values(False)
|
self.set_values(False)
|
||||||
self.close()
|
self.close()
|
||||||
if played_time:
|
|
||||||
|
if played_time and played_time > 30:
|
||||||
Dialog = ResumePlayback('ResumePlayback.xml', config.get_runtime_path(), played_time=played_time)
|
Dialog = ResumePlayback('ResumePlayback.xml', config.get_runtime_path(), played_time=played_time)
|
||||||
Dialog.show()
|
Dialog.show()
|
||||||
t = 0
|
t = 0
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ def mark_auto_as_watched(item):
|
|||||||
logger.debug()
|
logger.debug()
|
||||||
actual_time = 0
|
actual_time = 0
|
||||||
total_time = 0
|
total_time = 0
|
||||||
# logger.debug("item:\n" + item.tostring('\n'))
|
|
||||||
# if item.options['continue']: item.played_time = platformtools.resume_playback(platformtools.get_played_time(item))
|
|
||||||
|
|
||||||
time_limit = time.time() + 30
|
time_limit = time.time() + 30
|
||||||
while not platformtools.is_playing() and time.time() < time_limit:
|
while not platformtools.is_playing() and time.time() < time_limit:
|
||||||
@@ -49,9 +47,10 @@ def mark_auto_as_watched(item):
|
|||||||
logger.debug(next_episode)
|
logger.debug(next_episode)
|
||||||
|
|
||||||
while platformtools.is_playing():
|
while platformtools.is_playing():
|
||||||
xbmc.sleep(1000)
|
try: actual_time = xbmc.Player().getTime()
|
||||||
actual_time = xbmc.Player().getTime()
|
except: pass
|
||||||
total_time = xbmc.Player().getTotalTime()
|
try: total_time = xbmc.Player().getTotalTime()
|
||||||
|
except: pass
|
||||||
if item.played_time and xbmcgui.getCurrentWindowId() == 12005:
|
if item.played_time and xbmcgui.getCurrentWindowId() == 12005:
|
||||||
xbmc.Player().seekTime(item.played_time)
|
xbmc.Player().seekTime(item.played_time)
|
||||||
item.played_time = 0 # Fix for Slow Devices
|
item.played_time = 0 # Fix for Slow Devices
|
||||||
@@ -86,7 +85,7 @@ def mark_auto_as_watched(item):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# if item.options['continue']:
|
# if item.options['continue']:
|
||||||
if 10 < actual_time < mark_time:
|
if actual_time < mark_time:
|
||||||
item.played_time = actual_time
|
item.played_time = actual_time
|
||||||
else: item.played_time = 0
|
else: item.played_time = 0
|
||||||
platformtools.set_played_time(item)
|
platformtools.set_played_time(item)
|
||||||
|
|||||||
Reference in New Issue
Block a user