fix novità su kodi 19 e altri fix minori
This commit is contained in:
@@ -12,9 +12,6 @@ def getmainlist(view="thumb_"):
|
||||
logger.debug()
|
||||
itemlist = list()
|
||||
|
||||
if config.dev_mode():
|
||||
itemlist.append(Item(title="Redirect", action="check_channels", thumbnail='',
|
||||
category=config.get_localized_string(30119), viewmode="thumbnails"))
|
||||
# Main Menu Channels
|
||||
if addon.getSetting('enable_news_menu') == "true":
|
||||
itemlist.append(Item(title=config.get_localized_string(30130), channel="news", action="mainlist",
|
||||
|
||||
@@ -142,9 +142,9 @@ class Downloader(object):
|
||||
# We stop downloading
|
||||
self._state = self.states.stopped
|
||||
for t in self._threads:
|
||||
if t.isAlive(): t.join()
|
||||
if t.is_alive(): t.join()
|
||||
|
||||
if self._save_thread.isAlive(): self._save_thread.join()
|
||||
if self._save_thread.is_alive(): self._save_thread.join()
|
||||
|
||||
if self._seekable:
|
||||
# Guardamos la info al final del archivo
|
||||
|
||||
@@ -269,7 +269,7 @@ def wait_for_update_trakt():
|
||||
t = Thread(update_all)
|
||||
t.setDaemon(True)
|
||||
t.start()
|
||||
t.isAlive()
|
||||
t.is_alive()
|
||||
|
||||
def update_all():
|
||||
# from core.support import dbg;dbg()
|
||||
|
||||
@@ -40,7 +40,7 @@ def download_and_play(url, file_name, download_path):
|
||||
dialog.create(config.get_localized_string(60200), config.get_localized_string(60312))
|
||||
dialog.update(0)
|
||||
|
||||
while not cancelled and download_thread.isAlive():
|
||||
while not cancelled and download_thread.is_alive():
|
||||
dialog.update(download_thread.get_progress(), config.get_localized_string(60313) + '\n' +
|
||||
config.get_localized_string(60314) + str(int(old_div(download_thread.get_speed(), 1024))) + " KB/s " + str(
|
||||
download_thread.get_actual_size()) + config.get_localized_string(60316) + str( download_thread.get_total_size()) + "MB",
|
||||
@@ -67,15 +67,15 @@ def download_and_play(url, file_name, download_path):
|
||||
logger.info("Terminated by user")
|
||||
break
|
||||
else:
|
||||
if not download_thread.isAlive():
|
||||
if not download_thread.is_alive():
|
||||
logger.info("Download has finished")
|
||||
break
|
||||
else:
|
||||
logger.info("Continua la descarga")
|
||||
|
||||
# When the player finishes, if you continue downloading it for now
|
||||
logger.info("Download thread alive=" + str(download_thread.isAlive()))
|
||||
if download_thread.isAlive():
|
||||
logger.info("Download thread alive=" + str(download_thread.is_alive()))
|
||||
if download_thread.is_alive():
|
||||
logger.info("Killing download thread")
|
||||
download_thread.force_stop()
|
||||
|
||||
@@ -106,11 +106,11 @@ class CustomPlayer(xbmc.Player):
|
||||
def force_stop_download_thread(self):
|
||||
logger.info()
|
||||
|
||||
if self.download_thread.isAlive():
|
||||
if self.download_thread.is_alive():
|
||||
logger.info("Killing download thread")
|
||||
self.download_thread.force_stop()
|
||||
|
||||
# while self.download_thread.isAlive():
|
||||
# while self.download_thread.is_alive():
|
||||
# xbmc.sleep(1000)
|
||||
|
||||
def onPlayBackStarted(self):
|
||||
|
||||
@@ -290,7 +290,7 @@ def novedades(item):
|
||||
|
||||
# Multi Thread mode: wait for all threads to finish
|
||||
if multithread:
|
||||
pendent = [a for a in threads if a.isAlive()]
|
||||
pendent = [a for a in threads if a.is_alive()]
|
||||
t = float(100) / len(pendent)
|
||||
while pendent:
|
||||
index = (len(threads) - len(pendent)) + 1
|
||||
@@ -308,7 +308,7 @@ def novedades(item):
|
||||
break
|
||||
|
||||
time.sleep(0.5)
|
||||
pendent = [a for a in threads if a.isAlive()]
|
||||
pendent = [a for a in threads if a.is_alive()]
|
||||
if mode == 'normal':
|
||||
mensaje = config.get_localized_string(60522) % (len(list_newest), time.time() - start_time)
|
||||
progreso.update(100, mensaje)
|
||||
|
||||
@@ -358,11 +358,11 @@ try:
|
||||
self.control_list.addItems(self.items)
|
||||
self.setFocus(self.control_list)
|
||||
def onClick(self, id):
|
||||
global window_select, result
|
||||
# Cancel button y [X]
|
||||
if id == 7:
|
||||
window_select[-1].close()
|
||||
if id == 5:
|
||||
global window_select, result
|
||||
self.result = "_no_video"
|
||||
result = "no_video"
|
||||
self.close()
|
||||
|
||||
@@ -394,7 +394,10 @@ def findvideos(item):
|
||||
logger.debug("Unable to search for videos due to lack of parameters")
|
||||
return []
|
||||
|
||||
if item.contentEpisodeNumber:
|
||||
content_title = str(item.contentSeason) + 'x' + (str(item.contentEpisodeNumber) if item.contentEpisodeNumber > 9 else '0' + str(item.contentEpisodeNumber))
|
||||
else:
|
||||
content_title = item.contentTitle.strip().lower()
|
||||
if item.contentType == 'movie':
|
||||
item.strm_path = filetools.join(videolibrarytools.MOVIES_PATH, item.strm_path)
|
||||
path_dir = filetools.dirname(item.strm_path)
|
||||
|
||||
@@ -142,7 +142,7 @@ servers = []
|
||||
channels = []
|
||||
|
||||
channel_list = channelselector.filterchannels("all") if 'KOD_TST_CH' not in os.environ else [Item(channel=os.environ['KOD_TST_CH'], action="mainlist")]
|
||||
logger.info(channel_list)
|
||||
logger.info([c.channel for c in channel_list])
|
||||
ret = []
|
||||
|
||||
logger.record = True
|
||||
|
||||
Reference in New Issue
Block a user