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

View File

@@ -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'

View File

@@ -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)