Fix gestione finestra server

This commit is contained in:
Alhaziel01
2022-10-24 10:27:32 +02:00
parent b23480664b
commit f545d74a75
3 changed files with 20 additions and 42 deletions
+5 -12
View File
@@ -83,18 +83,8 @@ def mark_auto_as_watched(item):
break
# if item.options['continue']:
from core import db
if marked:
logger.debug('CLOSE')
item.played_time = 0
if total_time > 20:
db['controls']['reopen'] = False
else:
db['controls']['reopen'] = True
else:
logger.debug('REOPEN')
item.played_time = actual_time
db['controls']['reopen'] = True
if (marked and total_time < 20) or not marked:
platformtools.serverWindow(item, itemlist)
platformtools.set_played_time(item)
@@ -112,7 +102,10 @@ def mark_auto_as_watched(item):
db.close()
# If it is configured to mark as seen
from core import db
if config.get_setting("mark_as_watched", "videolibrary"):
itemlist = db['player'].get('itemlist', [])
db.close()
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()
logger.debug('EXIT MONITOR')