From 5de72e7061170031dffe00077fb70a5bbaf79bdf Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 29 Jun 2020 19:58:03 +0200 Subject: [PATCH] Rimossi import inutilizzati --- platformcode/launcher.py | 10 ++++------ specials/autoplay.py | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/platformcode/launcher.py b/platformcode/launcher.py index 066d6230..6a4a0cc3 100644 --- a/platformcode/launcher.py +++ b/platformcode/launcher.py @@ -128,7 +128,6 @@ def run(item=None): if tmdb.drop_bd(): platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60011), time=2000, sound=False) elif item.action == "itemInfo": - import base64 platformtools.dialog_textviewer('Item info', item.parent) elif item.action == "open_browser": import webbrowser @@ -294,7 +293,7 @@ def run(item=None): logger.error(traceback.format_exc()) - patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + '([^.]+)\.py"' + patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + r'([^.]+)\.py"' Channel = scrapertools.find_single_match(traceback.format_exc(), patron) platformtools.dialog_ok( @@ -306,7 +305,7 @@ def run(item=None): logger.error(traceback.format_exc()) - patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + '([^.]+)\.py"' + patron = 'File "' + os.path.join(config.get_runtime_path(), "channels", "").replace("\\", "\\\\") + r'([^.]+)\.py"' Channel = scrapertools.find_single_match(traceback.format_exc(), patron) try: @@ -411,7 +410,7 @@ def play_from_library(item): @param item: item with information """ import xbmcgui, xbmcplugin, xbmc - from time import sleep, time + from time import sleep itemlist=[] item.fromLibrary = True @@ -433,8 +432,7 @@ def play_from_library(item): else: # Pop-up window - from specials import videolibrary, autoplay - # from core.support import dbg;dbg() + from specials import videolibrary p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683)) p_dialog.update(0, '') item.play_from = 'window' diff --git a/specials/autoplay.py b/specials/autoplay.py index e0a771c5..68377cff 100644 --- a/specials/autoplay.py +++ b/specials/autoplay.py @@ -26,7 +26,7 @@ def start(itemlist, item): :param item: item (the main item of the channel) :return: try to auto-reproduce, in case of failure it returns the itemlist that it received in the beginning ''' - from inspect import stack + if item.global_search: return itemlist logger.info() @@ -101,7 +101,7 @@ def start(itemlist, item): continue # If it does not have a defined quality, it assigns a 'default' quality. - if item.quality == '': + if item.quality not in quality_list: item.quality = 'default' # The list for custom settings is created @@ -232,8 +232,6 @@ def start(itemlist, item): # Check if the item comes from the video library try: if base_item.contentChannel == 'videolibrary' or base_item.nfo: - # Mark as seen - from platformcode import xbmc_videolibrary # Fill the video with the data of the main item and play play_item = base_item.clone(**videoitem.__dict__) platformtools.play_video(play_item, autoplay=True)