Fix Autoplay e Altadefinizione

This commit is contained in:
Alhaziel01
2022-10-25 09:05:49 +02:00
parent d9f8f9d6af
commit 23d652ebc5
3 changed files with 12 additions and 11 deletions

View File

@@ -88,7 +88,7 @@ def episodios(item):
def check(item):
item.data = httptools.downloadpage(item.url).data
if 'Stagione' in item.data:
if 'stagione' in item.data.lower():
item.contentType = 'tvshow'
return episodios(item)
else:

View File

@@ -2013,18 +2013,17 @@ def serverWindow(item, itemlist):
if itemlist:
db['player']['itemlist'] = itemlist
db.close()
if config.get_setting('autoplay') and not item.disableAutoplay:
from core import autoplay
autoplay.start(itemlist, item)
if config.get_setting('window_type') == 0:
selection = ServerSkinWindow("DialogSelect.xml", config.get_runtime_path()).start(item, itemlist)
else:
selection = ServerWindow('Servers.xml', config.get_runtime_path()).start(item, itemlist)
if selection != -1:
from core import db
from platformcode.launcher import run
db['player']['itemlist'] = itemlist
db.close()
run(selection)
if config.get_setting('window_type') == 0:
selection = ServerSkinWindow("DialogSelect.xml", config.get_runtime_path()).start(item, itemlist)
else:
selection = ServerWindow('Servers.xml', config.get_runtime_path()).start(item, itemlist)
if selection != -1:
from platformcode.launcher import run
run(selection)

View File

@@ -84,6 +84,7 @@ def mark_auto_as_watched(item):
# if item.options['continue']:
if (marked and total_time < 20) or not marked:
item.disableAutoplay=True
platformtools.serverWindow(item, itemlist)
platformtools.set_played_time(item)
@@ -105,6 +106,7 @@ def mark_auto_as_watched(item):
from core import db
if config.get_setting("mark_as_watched", "videolibrary"):
itemlist = db['player'].get('itemlist', [])
db['player']['itemlist'] = []
db.close()
threading.Thread(target=mark_as_watched_subThread, args=[item]).start()
logger.debug('EXIT MONITOR')