Minori informazioni con log disabilitato
This commit is contained in:
@@ -311,7 +311,7 @@ def menu(item):
|
||||
|
||||
# Show Dialog
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(30163), opciones)
|
||||
logger.info('SELECTION: '+ op[seleccion])
|
||||
logger.debug('SELECTION: '+ op[seleccion])
|
||||
|
||||
# -1 is cancel
|
||||
if seleccion == -1: return
|
||||
|
||||
@@ -24,7 +24,7 @@ except:
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
for name, thumb, data in read_favourites():
|
||||
@@ -81,7 +81,7 @@ def save_favourites(favourites_list):
|
||||
|
||||
|
||||
def addFavourite(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug(item.tostring('\n'))
|
||||
|
||||
# If you get here through the context menu, you must retrieve the action and channel parameters
|
||||
@@ -100,7 +100,7 @@ def addFavourite(item):
|
||||
|
||||
|
||||
def delFavourite(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug(item.tostring('\n'))
|
||||
|
||||
if item.from_title:
|
||||
@@ -118,7 +118,7 @@ def delFavourite(item):
|
||||
|
||||
|
||||
def renameFavourite(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug(item.tostring('\n'))
|
||||
|
||||
# Find the item we want to rename in favorites.xml
|
||||
@@ -137,7 +137,7 @@ def renameFavourite(item):
|
||||
##################################################
|
||||
# Features to migrate old favorites (.txt)
|
||||
def readbookmark(filepath):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
try:
|
||||
import urllib.parse as urllib
|
||||
except ImportError:
|
||||
@@ -233,6 +233,6 @@ try:
|
||||
if config.get_setting("bookmarkpath") != "":
|
||||
check_bookmark(config.get_setting("bookmarkpath"))
|
||||
else:
|
||||
logger.info("No path to old version favorites")
|
||||
logger.debug("No path to old version favorites")
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -18,7 +18,7 @@ TIMEOUT_TOTAL = 60
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info(" mainlist")
|
||||
logger.debug(" mainlist")
|
||||
itemlist = [#Item(channel="search", action='discover_list', title=config.get_localized_string(70309),
|
||||
#search_type='list', list_type='movie/now_playing',
|
||||
# thumbnail=get_thumb("now_playing.png")),
|
||||
@@ -91,7 +91,7 @@ def server_config(item):
|
||||
return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "specials", item.config))
|
||||
|
||||
def now_on_misc_film(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
logger.debug("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
@@ -126,7 +126,7 @@ def now_on_misc_film(item):
|
||||
return itemlist
|
||||
|
||||
def now_on_misc(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
logger.debug("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
@@ -161,7 +161,7 @@ def now_on_misc(item):
|
||||
return itemlist
|
||||
|
||||
def now_on_tv(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
logger.debug("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
@@ -195,7 +195,7 @@ def now_on_tv(item):
|
||||
return itemlist
|
||||
|
||||
def primafila(item):
|
||||
logger.info("filmontv tvoggi")
|
||||
logger.debug("filmontv tvoggi")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ if config.is_xbmc():
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
if config.is_xbmc():
|
||||
|
||||
+25
-25
@@ -126,7 +126,7 @@ class KodfavouritesData(object):
|
||||
# ============================
|
||||
|
||||
def addFavourite(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
# If you get here through the context menu, you must retrieve the action and channel parameters
|
||||
@@ -179,7 +179,7 @@ def addFavourite(item):
|
||||
# ====================
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
item.category = get_name_from_filename(os.path.basename(alfav.user_favorites_file))
|
||||
|
||||
@@ -216,7 +216,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def mostrar_perfil(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
itemlist = []
|
||||
@@ -289,7 +289,7 @@ def _crea_perfil(alfav):
|
||||
# Profile and link management
|
||||
|
||||
def crear_perfil(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not _crea_perfil(alfav): return False
|
||||
@@ -299,7 +299,7 @@ def crear_perfil(item):
|
||||
|
||||
|
||||
def editar_perfil_titulo(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -316,7 +316,7 @@ def editar_perfil_titulo(item):
|
||||
|
||||
|
||||
def eliminar_perfil(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -332,7 +332,7 @@ def eliminar_perfil(item):
|
||||
|
||||
|
||||
def acciones_enlace(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
acciones = [config.get_localized_string(70620), config.get_localized_string(70621), config.get_localized_string(70622), config.get_localized_string(70623),
|
||||
config.get_localized_string(70624), config.get_localized_string(70548), config.get_localized_string(70625),
|
||||
@@ -364,7 +364,7 @@ def acciones_enlace(item):
|
||||
|
||||
|
||||
def editar_enlace_titulo(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -386,7 +386,7 @@ def editar_enlace_titulo(item):
|
||||
|
||||
|
||||
def editar_enlace_color(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -410,7 +410,7 @@ def editar_enlace_color(item):
|
||||
|
||||
|
||||
def editar_enlace_thumbnail(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -470,7 +470,7 @@ def editar_enlace_thumbnail(item):
|
||||
|
||||
|
||||
def editar_enlace_carpeta(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -489,7 +489,7 @@ def editar_enlace_carpeta(item):
|
||||
|
||||
|
||||
def editar_enlace_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -527,7 +527,7 @@ def editar_enlace_lista(item):
|
||||
|
||||
|
||||
def eliminar_enlace(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -542,7 +542,7 @@ def eliminar_enlace(item):
|
||||
|
||||
# Move profiles and links (up, down, top, bottom)
|
||||
def mover_perfil(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
alfav.user_favorites = _mover_item(alfav.user_favorites, item.i_perfil, item.direccion)
|
||||
@@ -552,7 +552,7 @@ def mover_perfil(item):
|
||||
return True
|
||||
|
||||
def mover_enlace(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
if not alfav.user_favorites[item.i_perfil]: return False
|
||||
@@ -597,7 +597,7 @@ def _mover_item(lista, i_selected, direccion):
|
||||
# ------------------------------------------
|
||||
|
||||
def mainlist_listas(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
item.category = 'Listas'
|
||||
|
||||
@@ -619,7 +619,7 @@ def mainlist_listas(item):
|
||||
|
||||
|
||||
def acciones_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
acciones = [config.get_localized_string(70604), config.get_localized_string(70629),
|
||||
config.get_localized_string(70605), config.get_localized_string(70606), config.get_localized_string(70607)]
|
||||
@@ -641,7 +641,7 @@ def acciones_lista(item):
|
||||
|
||||
|
||||
def activar_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
fullfilename = os.path.join(config.get_data_path(), item.lista)
|
||||
if not os.path.exists(fullfilename):
|
||||
@@ -659,7 +659,7 @@ def activar_lista(item):
|
||||
|
||||
|
||||
def renombrar_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
fullfilename_current = os.path.join(config.get_data_path(), item.lista)
|
||||
if not os.path.exists(fullfilename_current):
|
||||
@@ -695,7 +695,7 @@ def renombrar_lista(item):
|
||||
|
||||
|
||||
def eliminar_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
fullfilename = os.path.join(config.get_data_path(), item.lista)
|
||||
if not os.path.exists(fullfilename):
|
||||
@@ -714,7 +714,7 @@ def eliminar_lista(item):
|
||||
|
||||
|
||||
def informacion_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
fullfilename = os.path.join(config.get_data_path(), item.lista)
|
||||
if not os.path.exists(fullfilename):
|
||||
@@ -741,7 +741,7 @@ def informacion_lista(item):
|
||||
|
||||
|
||||
def compartir_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
fullfilename = os.path.join(config.get_data_path(), item.lista)
|
||||
if not os.path.exists(fullfilename):
|
||||
@@ -796,7 +796,7 @@ def compartir_lista(item):
|
||||
|
||||
|
||||
def acciones_nueva_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
acciones = [config.get_localized_string(70651),
|
||||
config.get_localized_string(70652),
|
||||
@@ -830,7 +830,7 @@ def acciones_nueva_lista(item):
|
||||
|
||||
|
||||
def crear_lista(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
titulo = platformtools.dialog_input(default='', heading=config.get_localized_string(70612))
|
||||
if titulo is None or titulo == '':
|
||||
@@ -853,7 +853,7 @@ def crear_lista(item):
|
||||
|
||||
|
||||
def descargar_lista(item, url):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
from core import httptools, scrapertools
|
||||
|
||||
if 'tinyupload.com/' in url:
|
||||
|
||||
+16
-16
@@ -42,7 +42,7 @@ menu_settings_path = os.path.join(config.get_data_path(), "settings_channels", '
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
# list_canales, any_active = get_channels_list()
|
||||
@@ -128,7 +128,7 @@ def set_category_context(item):
|
||||
|
||||
|
||||
def get_channels_list():
|
||||
logger.info()
|
||||
logger.debug()
|
||||
## import web_pdb; web_pdb.set_trace()
|
||||
## list_canales = {'peliculas': [], '4k': [], 'terror': [], 'infantiles': [], 'series': [], 'anime': [],
|
||||
## 'castellano': [], 'latino':[], 'italiano':[], 'torrent':[], 'documentales': []}
|
||||
@@ -166,14 +166,14 @@ def get_channels_list():
|
||||
return list_canales, any_active
|
||||
|
||||
def set_cache(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
item.mode = 'set_cache'
|
||||
t = Thread(target=novedades, args=[item])
|
||||
t.start()
|
||||
#t.join()
|
||||
|
||||
def get_from_cache(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist=[]
|
||||
cache_node = jsontools.get_node_from_file('menu_cache_data.json', 'cached')
|
||||
first=item.last
|
||||
@@ -198,7 +198,7 @@ def get_from_cache(item):
|
||||
return itemlist
|
||||
|
||||
def add_menu_items(item, itemlist):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
menu_icon = get_thumb('menu.png')
|
||||
menu = Item(channel="channelselector", action="getmainlist", viewmode="movie", thumbnail=menu_icon, title='Menu')
|
||||
@@ -215,7 +215,7 @@ def add_menu_items(item, itemlist):
|
||||
return itemlist
|
||||
|
||||
def novedades(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
global list_newest
|
||||
threads = []
|
||||
@@ -231,7 +231,7 @@ def novedades(item):
|
||||
return get_from_cache(item)
|
||||
|
||||
multithread = config.get_setting("multithread", "news")
|
||||
logger.info("multithread= " + str(multithread))
|
||||
logger.debug("multithread= " + str(multithread))
|
||||
|
||||
if not multithread:
|
||||
if platformtools.dialog_yesno(config.get_localized_string(60515),
|
||||
@@ -270,7 +270,7 @@ def novedades(item):
|
||||
|
||||
# if progreso.iscanceled():
|
||||
# progreso.close()
|
||||
# logger.info("Búsqueda cancelada")
|
||||
# logger.debug("Búsqueda cancelada")
|
||||
# return itemlist
|
||||
|
||||
# Modo Multi Thread
|
||||
@@ -284,7 +284,7 @@ def novedades(item):
|
||||
# Modo single Thread
|
||||
else:
|
||||
if mode == 'normal':
|
||||
logger.info("Obteniendo novedades de channel_id=" + channel_id)
|
||||
logger.debug("Obteniendo novedades de channel_id=" + channel_id)
|
||||
progreso.update(percentage, "", config.get_localized_string(60520) % channel_title)
|
||||
get_newest(channel_id, item.extra)
|
||||
|
||||
@@ -304,7 +304,7 @@ def novedades(item):
|
||||
logger.debug(mensaje)
|
||||
|
||||
if progreso.iscanceled():
|
||||
logger.info("Busqueda de novedades cancelada")
|
||||
logger.debug("Busqueda de novedades cancelada")
|
||||
break
|
||||
|
||||
time.sleep(0.5)
|
||||
@@ -312,7 +312,7 @@ def novedades(item):
|
||||
if mode == 'normal':
|
||||
mensaje = config.get_localized_string(60522) % (len(list_newest), time.time() - start_time)
|
||||
progreso.update(100, mensaje)
|
||||
logger.info(mensaje)
|
||||
logger.debug(mensaje)
|
||||
start_time = time.time()
|
||||
# logger.debug(start_time)
|
||||
|
||||
@@ -345,7 +345,7 @@ def novedades(item):
|
||||
|
||||
|
||||
def get_newest(channel_id, categoria):
|
||||
logger.info("channel_id=" + channel_id + ", categoria=" + categoria)
|
||||
logger.debug("channel_id=" + channel_id + ", categoria=" + categoria)
|
||||
|
||||
global list_newest
|
||||
global list_newest_tourl
|
||||
@@ -366,9 +366,9 @@ def get_newest(channel_id, categoria):
|
||||
if not puede:
|
||||
return
|
||||
|
||||
logger.info("running channel " + modulo.__name__ + " " + modulo.__file__)
|
||||
logger.debug("running channel " + modulo.__name__ + " " + modulo.__file__)
|
||||
list_result = modulo.newest(categoria)
|
||||
logger.info("canal= %s %d resultados" % (channel_id, len(list_result)))
|
||||
logger.debug("canal= %s %d resultados" % (channel_id, len(list_result)))
|
||||
exist=False
|
||||
if os.path.exists(menu_cache_path):
|
||||
cache_node = jsontools.get_node_from_file('menu_cache_data.json', 'cached')
|
||||
@@ -377,7 +377,7 @@ def get_newest(channel_id, categoria):
|
||||
cache_node = {}
|
||||
# logger.debug('cache node: %s' % cache_node)
|
||||
for item in list_result:
|
||||
# logger.info("item="+item.tostring())
|
||||
# logger.debug("item="+item.tostring())
|
||||
item.channel = channel_id
|
||||
list_newest.append(item)
|
||||
list_newest_tourl.append(item.tourl())
|
||||
@@ -532,7 +532,7 @@ def group_by_content(list_result_canal):
|
||||
|
||||
|
||||
def show_channels(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
global channels_id_name
|
||||
channels_id_name = item.extra
|
||||
itemlist = []
|
||||
|
||||
+9
-9
@@ -36,7 +36,7 @@ def_lang = info_language[config.get_setting("info_language", "videolibrary")]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = [Item(channel=item.channel, title=config.get_localized_string(70276), action='new_search', mode='all', thumbnail=get_thumb("search.png")),
|
||||
Item(channel=item.channel, title=config.get_localized_string(70741) % config.get_localized_string(30122), action='new_search', mode='movie', thumbnail=get_thumb("search_movie.png")),
|
||||
@@ -53,7 +53,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def sub_menu(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = [Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70306), mode='movie', thumbnail=get_thumb("movie_genre.png")),
|
||||
Item(channel=item.channel, action='years_menu', title=config.get_localized_string(70742), mode='movie', thumbnail=get_thumb("movie_year.png")),
|
||||
@@ -71,7 +71,7 @@ def sub_menu(item):
|
||||
|
||||
|
||||
def saved_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = list()
|
||||
saved_searches_list = get_saved_searches()
|
||||
@@ -98,7 +98,7 @@ def saved_search(item):
|
||||
|
||||
|
||||
def new_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
temp_search_file = config.get_temp_file('temp-search')
|
||||
if filetools.isfile(temp_search_file):
|
||||
@@ -394,14 +394,14 @@ def get_servers(item, module_dict):
|
||||
|
||||
|
||||
def get_info(itemlist):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
tmdb.set_infoLabels_itemlist(itemlist, True, forced=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_channels(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
channels_list = list()
|
||||
title_list = list()
|
||||
@@ -723,7 +723,7 @@ def discover_list(item):
|
||||
|
||||
|
||||
def from_context(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
select = setting_channel_new(item)
|
||||
|
||||
@@ -744,7 +744,7 @@ def from_context(item):
|
||||
|
||||
|
||||
def set_context(itemlist):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
for elem in itemlist:
|
||||
elem.context = [{"title": config.get_localized_string(60412),
|
||||
@@ -761,7 +761,7 @@ def set_context(itemlist):
|
||||
|
||||
|
||||
def get_from_temp(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
n = 30
|
||||
nTotal = len(item.itemlist)
|
||||
|
||||
+15
-15
@@ -20,7 +20,7 @@ CHANNELNAME = "setting"
|
||||
|
||||
|
||||
def menu_channels(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60545), action="conf_tools", folder=False,
|
||||
@@ -55,7 +55,7 @@ def channel_config(item):
|
||||
|
||||
|
||||
# def setting_torrent(item):
|
||||
# logger.info()
|
||||
# logger.debug()
|
||||
|
||||
# LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default="")
|
||||
# LIBTORRENT_ERROR = config.get_setting("libtorrent_error", server="torrent", default="")
|
||||
@@ -192,7 +192,7 @@ def channel_config(item):
|
||||
# config.set_setting("magnet2torrent", dict_data_saved["magnet2torrent"], server="torrent")
|
||||
|
||||
def menu_servers(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60550), action="servers_blacklist", folder=False,
|
||||
@@ -221,7 +221,7 @@ def menu_servers(item):
|
||||
|
||||
for server in sorted(server_list):
|
||||
server_parameters = servertools.get_server_parameters(server)
|
||||
logger.info(server_parameters)
|
||||
logger.debug(server_parameters)
|
||||
if server_parameters["has_settings"] and [x for x in server_parameters["settings"] if x["id"] not in ["black_list", "white_list"]]:
|
||||
itemlist.append(
|
||||
Item(channel=CHANNELNAME, title=". " + config.get_localized_string(60553) % server_parameters["name"],
|
||||
@@ -355,7 +355,7 @@ def cb_servers_favorites(server_names, dict_values):
|
||||
i += 1
|
||||
|
||||
c = 1
|
||||
logger.info(dict_favorites)
|
||||
logger.debug(dict_favorites)
|
||||
favorites_servers_list = []
|
||||
while c in dict_favorites:
|
||||
favorites_servers_list.append(dict_favorites[c])
|
||||
@@ -373,7 +373,7 @@ def settings(item):
|
||||
|
||||
|
||||
def submenu_tools(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = list()
|
||||
|
||||
# Custom tools
|
||||
@@ -414,7 +414,7 @@ def submenu_tools(item):
|
||||
|
||||
|
||||
def check_quickfixes(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
if not config.dev_mode():
|
||||
from platformcode import updater
|
||||
@@ -425,7 +425,7 @@ def check_quickfixes(item):
|
||||
|
||||
|
||||
# def update_quasar(item):
|
||||
# logger.info()
|
||||
# logger.debug()
|
||||
|
||||
# from platformcode import custom_code, platformtools
|
||||
# stat = False
|
||||
@@ -437,7 +437,7 @@ def check_quickfixes(item):
|
||||
|
||||
|
||||
def conf_tools(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
# Enable or disable channels
|
||||
if item.extra == "channels_onoff":
|
||||
@@ -539,14 +539,14 @@ def conf_tools(item):
|
||||
action="", folder=False,
|
||||
thumbnail=channel.thumbnail))
|
||||
continue
|
||||
# logger.info(channel.channel + " SALTADO!")
|
||||
# logger.debug(channel.channel + " SALTADO!")
|
||||
|
||||
# The json file settings of the channel are loaded
|
||||
file_settings = os.path.join(config.get_data_path(), "settings_channels", channel.channel + "_data.json")
|
||||
dict_settings = {}
|
||||
dict_file = {}
|
||||
if filetools.exists(file_settings):
|
||||
# logger.info(channel.channel + " Has _data.json file")
|
||||
# logger.debug(channel.channel + " Has _data.json file")
|
||||
channeljson_exists = True
|
||||
# We get saved settings from ../settings/channel_data.json
|
||||
try:
|
||||
@@ -556,7 +556,7 @@ def conf_tools(item):
|
||||
except EnvironmentError:
|
||||
logger.error("ERROR when reading the file: %s" % file_settings)
|
||||
else:
|
||||
# logger.info(channel.channel + " No _data.json file")
|
||||
# logger.debug(channel.channel + " No _data.json file")
|
||||
channeljson_exists = False
|
||||
|
||||
if channeljson_exists:
|
||||
@@ -576,7 +576,7 @@ def conf_tools(item):
|
||||
# Default settings are loaded
|
||||
list_controls, default_settings = channeltools.get_channel_controls_settings(
|
||||
channel.channel)
|
||||
# logger.info(channel.title + " | Default: %s" % default_settings)
|
||||
# logger.debug(channel.title + " | Default: %s" % default_settings)
|
||||
except:
|
||||
import traceback
|
||||
logger.error(channel.title + config.get_localized_string(60570) % traceback.format_exc())
|
||||
@@ -598,7 +598,7 @@ def conf_tools(item):
|
||||
list_status = config.get_localized_string(60571)
|
||||
|
||||
else:
|
||||
# logger.info(channel.channel + " - NO correction needed!")
|
||||
# logger.debug(channel.channel + " - NO correction needed!")
|
||||
needsfix = False
|
||||
|
||||
# If the channel status has been set it is added to the list
|
||||
@@ -828,7 +828,7 @@ def restore_tools(item):
|
||||
|
||||
|
||||
def report_menu(item):
|
||||
logger.info('URL: ' + item.url)
|
||||
logger.debug('URL: ' + item.url)
|
||||
|
||||
from channelselector import get_thumb
|
||||
|
||||
|
||||
+10
-10
@@ -43,7 +43,7 @@ else:
|
||||
|
||||
|
||||
def buscartrailer(item, trailers=[]):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
# List of actions if run from context menu
|
||||
if item.action == "manual_search" and item.contextual:
|
||||
@@ -78,8 +78,8 @@ def buscartrailer(item, trailers=[]):
|
||||
|
||||
item.year = item.infoLabels['year']
|
||||
|
||||
logger.info("Search: %s" % item.contentTitle)
|
||||
logger.info("Year: %s" % item.year)
|
||||
logger.debug("Search: %s" % item.contentTitle)
|
||||
logger.debug("Year: %s" % item.year)
|
||||
if item.infoLabels['trailer'] and not trailers:
|
||||
url = item.infoLabels['trailer']
|
||||
if "youtube" in url:
|
||||
@@ -122,7 +122,7 @@ def buscartrailer(item, trailers=[]):
|
||||
|
||||
|
||||
def manual_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
texto = platformtools.dialog_input(default=item.contentTitle, heading=config.get_localized_string(30112))
|
||||
if texto is not None:
|
||||
if item.extra == "mymovies":
|
||||
@@ -134,7 +134,7 @@ def manual_search(item):
|
||||
|
||||
|
||||
def tmdb_trailers(item, tipo="movie"):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
from core.tmdb import Tmdb
|
||||
itemlist = []
|
||||
@@ -153,7 +153,7 @@ def tmdb_trailers(item, tipo="movie"):
|
||||
|
||||
|
||||
def youtube_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
title = item.contentTitle
|
||||
if item.extra != "youtube":
|
||||
@@ -192,7 +192,7 @@ def youtube_search(item):
|
||||
|
||||
|
||||
def mymovies_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
import json
|
||||
|
||||
title = item.contentTitle
|
||||
@@ -216,7 +216,7 @@ def mymovies_search(item):
|
||||
|
||||
|
||||
def search_links_mymovies(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
trailer_url = match(item, patron=r'<li class="bottone_playlist"[^>]+><a href="([^"]+)"').match
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
@@ -236,7 +236,7 @@ def search_links_mymovies(item):
|
||||
|
||||
|
||||
def filmaffinity_search(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
if item.filmaffinity:
|
||||
item.url = item.filmaffinity
|
||||
@@ -284,7 +284,7 @@ def filmaffinity_search(item):
|
||||
|
||||
|
||||
def search_links_filmaff(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
+20
-20
@@ -28,7 +28,7 @@ default_fan = filetools.join(config.get_runtime_path(), "fanart.jpg")
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = [
|
||||
# TMDB
|
||||
# item.clone(title=typo(config.get_localized_string(70021), 'bold'), action=""),
|
||||
@@ -55,7 +55,7 @@ def configuracion(item):
|
||||
return ret
|
||||
|
||||
def search_star(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
item.type='movie'
|
||||
@@ -97,7 +97,7 @@ def search_(item):
|
||||
|
||||
|
||||
def searcing(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
new_item = Item(title=item.contentTitle, text=item.contentTitle.replace("+", " "), mode=item.contentType, infoLabels=item.infoLabels)
|
||||
|
||||
@@ -625,7 +625,7 @@ def indices_tmdb(item):
|
||||
|
||||
|
||||
def filter(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
from datetime import datetime
|
||||
list_controls = []
|
||||
@@ -705,7 +705,7 @@ def filtered(item, values):
|
||||
|
||||
|
||||
def musica_movie(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
data = match(item).data
|
||||
matches = match(data, patron=r'<td class="left">([^<]+)<br><small>([^<]+)</small>.*?<td>(\d+:\d+).*?<p id="([^"]+)"').matches
|
||||
@@ -729,7 +729,7 @@ def list_imdb(item):
|
||||
url = 'http://www.imdb.com/search/title?' + item.url
|
||||
# data = httptools.downloadpage(url, headers=headers, replace_headers=True).data
|
||||
data = match(url, headers=headers).data
|
||||
logger.info(data)
|
||||
logger.debug(data)
|
||||
|
||||
# data = re.sub(r"\n|\r|\t| ", "", data)
|
||||
# data = re.sub(r"\s{2}", " ", data)
|
||||
@@ -812,7 +812,7 @@ def list_imdb(item):
|
||||
|
||||
|
||||
def filter_imdb(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
from datetime import datetime
|
||||
list_controls = []
|
||||
@@ -1392,7 +1392,7 @@ def indices_imdb(item):
|
||||
|
||||
|
||||
# def filter_fa(item):
|
||||
# logger.info()
|
||||
# logger.debug()
|
||||
|
||||
# from datetime import datetime
|
||||
# list_controls = []
|
||||
@@ -1494,7 +1494,7 @@ def indices_imdb(item):
|
||||
|
||||
|
||||
# def login_fa():
|
||||
# logger.info()
|
||||
# logger.debug()
|
||||
|
||||
# try:
|
||||
# user = config.get_setting("usuariofa", "tvmoviedb")
|
||||
@@ -1519,7 +1519,7 @@ def indices_imdb(item):
|
||||
# userid = scrapertools.find_single_match(data, 'id-user=(\d+)')
|
||||
# if userid:
|
||||
# config.set_setting("userid", userid, "tvmoviedb")
|
||||
# logger.info("Login correcto")
|
||||
# logger.debug("Login correcto")
|
||||
# return True, ""
|
||||
# except:
|
||||
# import traceback
|
||||
@@ -1644,7 +1644,7 @@ def indices_imdb(item):
|
||||
|
||||
# def votar_fa(item):
|
||||
# # Window to select the vote
|
||||
# logger.info()
|
||||
# logger.debug()
|
||||
|
||||
# list_controls = []
|
||||
# valores = {}
|
||||
@@ -1921,7 +1921,7 @@ def acciones_trakt(item):
|
||||
ratings = []
|
||||
try:
|
||||
for i, entry in enumerate(data):
|
||||
logger.info('ENTRY:',entry)
|
||||
logger.debug('ENTRY:',entry)
|
||||
if i <= item.pagina: continue
|
||||
# try: entry = entry[item.args]
|
||||
# except: pass
|
||||
@@ -1997,7 +1997,7 @@ def acciones_trakt(item):
|
||||
|
||||
|
||||
def order_list(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
list_controls = []
|
||||
valores1 = ['rating', 'added', 'title', 'released', 'runtime', 'popularity', 'percentage', 'votes']
|
||||
@@ -2339,7 +2339,7 @@ def indices_mal(item):
|
||||
matches = match("https://myanimelist.net/anime.php", cookies=False, patronBlock=patronBlock, patron=patron).matches
|
||||
for url, title in matches:
|
||||
genero = title.split(" (", 1)[0]
|
||||
logger.info(url_base, genero)
|
||||
logger.debug(url_base, genero)
|
||||
thumbnail = url_base + genero.lower().replace(" ", "%20")
|
||||
if genero in ["Hentai", "Yaoi", "Yuri"] and not adult_mal:
|
||||
continue
|
||||
@@ -2488,7 +2488,7 @@ def detail_staff(item):
|
||||
patron_bio = r'<?<div class="spaceit_pad">(.*?)</td>'
|
||||
bio = match(data, patron=patron_bio).match
|
||||
bio = htmlclean(bio.replace("</div>", "\n"))
|
||||
logger.info(bio)
|
||||
logger.debug(bio)
|
||||
infoLabels = {'plot': bio}
|
||||
if not "No voice acting roles" in data:
|
||||
itemlist.append(Item(channel=item.channel, title=typo(config.get_localized_string(70374),'bold bullet'), action="", thumbnail=item.thumbnail, infoLabels=infoLabels))
|
||||
@@ -2626,7 +2626,7 @@ def info_anidb(item, itemlist, url):
|
||||
|
||||
|
||||
def filter_mal(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
list_controls = []
|
||||
valores = {}
|
||||
@@ -2704,7 +2704,7 @@ def callback_mal(item, values):
|
||||
|
||||
def musica_anime(item):
|
||||
# List available anime and songs similar to the anime title
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
data = match("http://www.freeanimemusic.org/song_search.php", post=item.post).data
|
||||
@@ -2739,7 +2739,7 @@ def musica_anime(item):
|
||||
|
||||
|
||||
def login_mal(from_list=False):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
from core import httptools
|
||||
from base64 import b64decode as bdec
|
||||
|
||||
@@ -2768,7 +2768,7 @@ def login_mal(from_list=False):
|
||||
else:
|
||||
if generic:
|
||||
return False, config.get_localized_string(70393), user
|
||||
logger.info("Correct login")
|
||||
logger.debug("Correct login")
|
||||
return True, "", user
|
||||
except:
|
||||
import traceback
|
||||
@@ -2800,7 +2800,7 @@ def cuenta_mal(item):
|
||||
|
||||
def items_mal(item):
|
||||
# Scraper for personal lists
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
data = match(item.url).data
|
||||
|
||||
|
||||
+22
-25
@@ -20,7 +20,7 @@ else:
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = [Item(channel=item.channel, action="list_movies", title=config.get_localized_string(60509),
|
||||
category=config.get_localized_string(70270), thumbnail=thumb("videolibrary_movie")),
|
||||
@@ -37,7 +37,7 @@ def channel_config(item):
|
||||
|
||||
|
||||
def list_movies(item, silent=False):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
movies_path = []
|
||||
for root, folders, files in filetools.walk(videolibrarytools.MOVIES_PATH):
|
||||
@@ -61,9 +61,7 @@ def list_movies(item, silent=False):
|
||||
|
||||
|
||||
def list_tvshows(item):
|
||||
from time import time
|
||||
start = time()
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
lista = []
|
||||
tvshows_path = []
|
||||
@@ -88,7 +86,6 @@ def list_tvshows(item):
|
||||
title=typo(config.get_localized_string(70269), 'bold color kod'), folder=False),
|
||||
Item(channel=item.channel, action="configure_update_videolibrary", thumbnail=item.thumbnail,
|
||||
title=typo(config.get_localized_string(60599), 'bold color kod'), lista=lista, folder=False)]
|
||||
logger.info('TEMPO= ' + str(time() - start))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -188,7 +185,7 @@ def get_results(nfo_path, root, Type, local=False):
|
||||
# Contextual menu: Mark as seen / not seen
|
||||
visto = item.library_playcounts.get(item.contentTitle, 0)
|
||||
item.infoLabels["playcount"] = visto
|
||||
logger.info('item\n' + str(item))
|
||||
logger.debug('item\n' + str(item))
|
||||
if visto > 0:
|
||||
seen_text = config.get_localized_string(60020)
|
||||
counter = 0
|
||||
@@ -260,7 +257,7 @@ def configure_update_videolibrary(item):
|
||||
|
||||
|
||||
def get_seasons(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
itemlist = []
|
||||
dict_temp = {}
|
||||
@@ -319,7 +316,7 @@ def get_seasons(item):
|
||||
|
||||
|
||||
def get_episodes(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
itemlist = []
|
||||
|
||||
@@ -383,7 +380,7 @@ def get_episodes(item):
|
||||
|
||||
def findvideos(item):
|
||||
from core import autoplay
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
videolibrarytools.check_renumber_options(item)
|
||||
itemlist = []
|
||||
@@ -535,7 +532,7 @@ def findvideos(item):
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
if not item.contentChannel == "local":
|
||||
@@ -575,7 +572,7 @@ def play(item):
|
||||
|
||||
|
||||
def update_videolibrary(item=''):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
# Update active series by overwriting
|
||||
import service
|
||||
@@ -595,7 +592,7 @@ def update_videolibrary(item=''):
|
||||
|
||||
|
||||
def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_folder, current_tvshows_folder, new_tvshows_folder):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
backup_current_path = current_path
|
||||
backup_new_path = new_path
|
||||
@@ -668,7 +665,7 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
|
||||
|
||||
|
||||
def delete_videolibrary(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
if not platformtools.dialog_yesno(config.get_localized_string(20000), config.get_localized_string(80037)):
|
||||
return
|
||||
@@ -694,7 +691,7 @@ def delete_videolibrary(item):
|
||||
|
||||
# context menu methods
|
||||
def update_tvshow(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
heading = config.get_localized_string(60037)
|
||||
@@ -720,11 +717,11 @@ def update_tvshow(item):
|
||||
|
||||
|
||||
def add_local_episodes(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
done, local_episodes_path = videolibrarytools.config_local_episodes_path(item.path, item, silent=True)
|
||||
if done < 0:
|
||||
logger.info("An issue has occurred while configuring local episodes")
|
||||
logger.debug("An issue has occurred while configuring local episodes")
|
||||
elif local_episodes_path:
|
||||
nfo_path = filetools.join(item.path, "tvshow.nfo")
|
||||
head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path)
|
||||
@@ -739,7 +736,7 @@ def add_local_episodes(item):
|
||||
|
||||
|
||||
def remove_local_episodes(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
nfo_path = filetools.join(item.path, "tvshow.nfo")
|
||||
head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path)
|
||||
@@ -757,7 +754,7 @@ def remove_local_episodes(item):
|
||||
|
||||
|
||||
def verify_playcount_series(item, path):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
"""
|
||||
This method reviews and repairs the PlayCount of a series that has become out of sync with the actual list of episodes in its folder. Entries for missing episodes, seasons, or series are created with the "not seen" mark. Later it is sent to verify the counters of Seasons and Series
|
||||
@@ -820,7 +817,7 @@ def verify_playcount_series(item, path):
|
||||
|
||||
|
||||
def mark_content_as_watched2(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
if filetools.isfile(item.nfo):
|
||||
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
|
||||
@@ -858,7 +855,7 @@ def mark_content_as_watched2(item):
|
||||
|
||||
|
||||
def mark_content_as_watched(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
#logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
if filetools.exists(item.nfo):
|
||||
@@ -896,7 +893,7 @@ def mark_content_as_watched(item):
|
||||
|
||||
|
||||
def mark_season_as_watched(item):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
# Get dictionary of marked episodes
|
||||
@@ -949,7 +946,7 @@ def mark_season_as_watched(item):
|
||||
|
||||
|
||||
def mark_tvshow_as_updatable(item, silent=False):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
|
||||
it.active = item.active
|
||||
filetools.write(item.nfo, head_nfo + it.tojson())
|
||||
@@ -1063,7 +1060,7 @@ def delete(item):
|
||||
|
||||
|
||||
def check_season_playcount(item, season):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
|
||||
if season:
|
||||
episodios_temporada = 0
|
||||
@@ -1085,7 +1082,7 @@ def check_season_playcount(item, season):
|
||||
|
||||
|
||||
def check_tvshow_playcount(item, season):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
if season:
|
||||
temporadas_serie = 0
|
||||
temporadas_vistas_serie = 0
|
||||
|
||||
Reference in New Issue
Block a user