Rimossi import inutilizzati

This commit is contained in:
Alhaziel01
2020-06-29 19:58:03 +02:00
parent 528c8678e1
commit 5de72e7061
2 changed files with 6 additions and 10 deletions
+4 -6
View File
@@ -128,7 +128,6 @@ def run(item=None):
if tmdb.drop_bd(): if tmdb.drop_bd():
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60011), time=2000, sound=False) platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60011), time=2000, sound=False)
elif item.action == "itemInfo": elif item.action == "itemInfo":
import base64
platformtools.dialog_textviewer('Item info', item.parent) platformtools.dialog_textviewer('Item info', item.parent)
elif item.action == "open_browser": elif item.action == "open_browser":
import webbrowser import webbrowser
@@ -294,7 +293,7 @@ def run(item=None):
logger.error(traceback.format_exc()) 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) Channel = scrapertools.find_single_match(traceback.format_exc(), patron)
platformtools.dialog_ok( platformtools.dialog_ok(
@@ -306,7 +305,7 @@ def run(item=None):
logger.error(traceback.format_exc()) 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) Channel = scrapertools.find_single_match(traceback.format_exc(), patron)
try: try:
@@ -411,7 +410,7 @@ def play_from_library(item):
@param item: item with information @param item: item with information
""" """
import xbmcgui, xbmcplugin, xbmc import xbmcgui, xbmcplugin, xbmc
from time import sleep, time from time import sleep
itemlist=[] itemlist=[]
item.fromLibrary = True item.fromLibrary = True
@@ -433,8 +432,7 @@ def play_from_library(item):
else: else:
# Pop-up window # Pop-up window
from specials import videolibrary, autoplay from specials import videolibrary
# from core.support import dbg;dbg()
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683)) p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
p_dialog.update(0, '') p_dialog.update(0, '')
item.play_from = 'window' item.play_from = 'window'
+2 -4
View File
@@ -26,7 +26,7 @@ def start(itemlist, item):
:param item: item (the main item of the channel) :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 :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: if item.global_search:
return itemlist return itemlist
logger.info() logger.info()
@@ -101,7 +101,7 @@ def start(itemlist, item):
continue continue
# If it does not have a defined quality, it assigns a 'default' quality. # 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' item.quality = 'default'
# The list for custom settings is created # The list for custom settings is created
@@ -232,8 +232,6 @@ def start(itemlist, item):
# Check if the item comes from the video library # Check if the item comes from the video library
try: try:
if base_item.contentChannel == 'videolibrary' or base_item.nfo: 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 # Fill the video with the data of the main item and play
play_item = base_item.clone(**videoitem.__dict__) play_item = base_item.clone(**videoitem.__dict__)
platformtools.play_video(play_item, autoplay=True) platformtools.play_video(play_item, autoplay=True)