- Fix Chiusura Globalsearch

- Fix Ripresa punto di visione
This commit is contained in:
Alhaziel01
2022-10-28 19:07:07 +02:00
parent 23d652ebc5
commit 7a2321d5cc
2 changed files with 11 additions and 10 deletions

View File

@@ -82,12 +82,6 @@ def mark_auto_as_watched(item):
nextdialog.close()
break
# 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)
# Silent sync with Trakt
if sync and config.get_setting("trakt_sync"): sync_trakt_kodi()
@@ -95,6 +89,11 @@ def mark_auto_as_watched(item):
while platformtools.is_playing():
xbmc.sleep(300)
if (marked and total_time < 20) or not marked:
platformtools.set_played_time(item.clone(played_time=actual_time))
item.disableAutoplay=True
platformtools.serverWindow(item, itemlist)
if next_episode and next_episode.next_ep and config.get_setting('next_ep') < 3:
from platformcode.launcher import run
xbmc.sleep(1000)

View File

@@ -23,6 +23,7 @@ close_action = False
update_lock = threading.Lock()
moduleDict = {}
searchActions = []
thread = None
def busy(state):
@@ -78,6 +79,7 @@ EPISODESLIST = 200
SERVERLIST = 300
class SearchWindow(xbmcgui.WindowXML):
global thread
def start(self, item, thActions=None):
logger.debug()
self.exit = False
@@ -538,8 +540,8 @@ class SearchWindow(xbmcgui.WindowXML):
if self.item.type:
self.item.mode = self.item.type
self.item.text = scrapertools.title_unify(self.item.text)
self.thread = Thread(target=self.search)
self.thread.start()
thread = Thread(target=self.search)
thread.start()
elif self.item.mode in ['movie', 'tvshow', 'person_']:
self.select()
elif self.item.mode in ['person']:
@@ -738,11 +740,11 @@ class SearchWindow(xbmcgui.WindowXML):
def Close(self):
self.exit = True
if self.thread:
if thread and thread.is_alive():
busy(True)
for th in self.search_threads:
th.cancel()
self.thread.join()
thread.join()
busy(False)
self.close()