- logger.info -> logger.log
- fix unshortenit kodi 19
This commit is contained in:
@@ -29,7 +29,7 @@ def start(itemlist, item):
|
||||
|
||||
if item.global_search:
|
||||
return itemlist
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
global PLAYED
|
||||
PLAYED = False
|
||||
@@ -272,7 +272,7 @@ def start(itemlist, item):
|
||||
|
||||
|
||||
def play_multi_channel(item, itemlist):
|
||||
logger.info()
|
||||
logger.log()
|
||||
global PLAYED
|
||||
video_dict = dict()
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ videolibrary_tvshows_path = u'' + videolibrarytools.TVSHOWS_PATH
|
||||
|
||||
|
||||
def export_videolibrary(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
zip_file_folder = platformtools.dialog_browse(3, config.get_localized_string(80002))
|
||||
if zip_file_folder == "":
|
||||
@@ -51,7 +51,7 @@ def export_videolibrary(item):
|
||||
|
||||
|
||||
def import_videolibrary(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
zip_file = u'' + platformtools.dialog_browse(1, config.get_localized_string(80005), mask=".zip")
|
||||
if zip_file == "":
|
||||
|
||||
@@ -37,7 +37,7 @@ class Kdicc():
|
||||
self.view_msg = view_msg
|
||||
self.lst_site_check_dns = lst_site_check_dns
|
||||
self.urls = []
|
||||
#logger.info("check #### INIZIO INIT#### ")
|
||||
#logger.log("check #### INIZIO INIT#### ")
|
||||
|
||||
def check_Ip(self):
|
||||
"""
|
||||
@@ -248,7 +248,7 @@ def check_channels(inutile=''):
|
||||
This is because it can happen that at any time the connection may have problems. If it does, check it
|
||||
relative writing of the file is interrupted with a warning message
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
folderJson = xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('path')).decode('utf-8')
|
||||
fileJson = 'channels.json'
|
||||
@@ -264,7 +264,7 @@ def check_channels(inutile=''):
|
||||
# to get an idea of the timing
|
||||
# useful only if you control all channels
|
||||
# for channels with error 522 about 40 seconds are lost ...
|
||||
logger.info("check #### INIZIO #### channel - host :%s - %s " % (chann, host))
|
||||
logger.log("check #### INIZIO #### channel - host :%s - %s " % (chann, host))
|
||||
|
||||
rslt = Kdicc(lst_urls = [host]).http_Resp()
|
||||
|
||||
@@ -288,10 +288,10 @@ def check_channels(inutile=''):
|
||||
# risultato[chann] = 'Errore Sconosciuto - '+str(rslt['code']) +' - '+ host
|
||||
risultato[chann] = host
|
||||
|
||||
logger.info("check #### FINE #### rslt :%s " % (rslt))
|
||||
logger.log("check #### FINE #### rslt :%s " % (rslt))
|
||||
|
||||
fileJson_test = 'channels-test.json'
|
||||
# I write the updated file
|
||||
with open(folderJson+'/'+fileJson_test, 'w') as f:
|
||||
data = json.dump(risultato, f, sort_keys=True, indent=4)
|
||||
logger.info(data)
|
||||
logger.log(data)
|
||||
|
||||
@@ -312,7 +312,7 @@ def menu(item):
|
||||
|
||||
# Show Dialog
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(30163), opciones)
|
||||
logger.info('SELECTION: '+ op[seleccion])
|
||||
logger.log('SELECTION: '+ op[seleccion])
|
||||
|
||||
# -1 is cancel
|
||||
if seleccion == -1: return
|
||||
|
||||
@@ -24,7 +24,7 @@ except:
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
|
||||
for name, thumb, data in read_favourites():
|
||||
@@ -81,7 +81,7 @@ def save_favourites(favourites_list):
|
||||
|
||||
|
||||
def addFavourite(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# 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.log()
|
||||
# logger.debug(item.tostring('\n'))
|
||||
|
||||
if item.from_title:
|
||||
@@ -118,7 +118,7 @@ def delFavourite(item):
|
||||
|
||||
|
||||
def renameFavourite(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# 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.log()
|
||||
import urllib
|
||||
|
||||
bookmarkfile = filetools.file_open(filepath)
|
||||
@@ -230,6 +230,6 @@ try:
|
||||
if config.get_setting("bookmarkpath") != "":
|
||||
check_bookmark(config.get_setting("bookmarkpath"))
|
||||
else:
|
||||
logger.info("No path to old version favorites")
|
||||
logger.log("No path to old version favorites")
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -193,7 +193,7 @@ def listaCanali(item):
|
||||
thumbnail = None
|
||||
skip = False
|
||||
# return itemlist
|
||||
# logger.info([i.title for i in itemlist])
|
||||
# logger.log([i.title for i in itemlist])
|
||||
f.close()
|
||||
return sorted(itemlist, key=lambda x: x.title)
|
||||
|
||||
|
||||
+13
-13
@@ -234,7 +234,7 @@ def get_link(list_item, item, list_language, list_quality=None, global_filter_la
|
||||
@return: Item list
|
||||
@rtype: list[Item]
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# if the required fields are None we leave
|
||||
if list_item is None or item is None:
|
||||
@@ -274,7 +274,7 @@ def get_links(list_item, item, list_language, list_quality=None, global_filter_l
|
||||
@return: lista de Item
|
||||
@rtype: list[Item]
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
|
||||
# if the required fields are None we leave
|
||||
@@ -362,7 +362,7 @@ def no_filter(item):
|
||||
@return: lista de enlaces
|
||||
@rtype: list[Item]
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = []
|
||||
for i in item.list_item_all:
|
||||
@@ -384,7 +384,7 @@ def mainlist(channel, list_language, list_quality):
|
||||
@return: Item list
|
||||
@rtype: list[Item]
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
dict_series = jsontools.get_node_from_file(channel, TAG_TVSHOW_FILTER)
|
||||
|
||||
@@ -425,8 +425,8 @@ def config_item(item):
|
||||
@param item: item
|
||||
@type item: Item
|
||||
"""
|
||||
logger.info()
|
||||
logger.info("item %s" % item.tostring())
|
||||
logger.log()
|
||||
logger.log("item %s" % item.tostring())
|
||||
|
||||
# WE GET THE JSON DATA
|
||||
dict_series = jsontools.get_node_from_file(item.from_channel, TAG_TVSHOW_FILTER)
|
||||
@@ -448,8 +448,8 @@ def config_item(item):
|
||||
else:
|
||||
lang_selected = dict_series.get(tvshow, {}).get(TAG_LANGUAGE, default_lang)
|
||||
list_quality = dict_series.get(tvshow, {}).get(TAG_QUALITY_ALLOWED, [x.lower() for x in item.list_quality])
|
||||
# logger.info("lang selected {}".format(lang_selected))
|
||||
# logger.info("list quality {}".format(list_quality))
|
||||
# logger.log("lang selected {}".format(lang_selected))
|
||||
# logger.log("list quality {}".format(list_quality))
|
||||
|
||||
active = True
|
||||
custom_button = {'visible': False}
|
||||
@@ -516,7 +516,7 @@ def config_item(item):
|
||||
|
||||
|
||||
def delete(item, dict_values):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if item:
|
||||
dict_series = jsontools.get_node_from_file(item.from_channel, TAG_TVSHOW_FILTER)
|
||||
@@ -554,7 +554,7 @@ def save(item, dict_data_saved):
|
||||
@param dict_data_saved: dictionary with saved data
|
||||
@type dict_data_saved: dict
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if item and dict_data_saved:
|
||||
logger.debug('item: %s\ndatos: %s' % (item.tostring(), dict_data_saved))
|
||||
@@ -564,7 +564,7 @@ def save(item, dict_data_saved):
|
||||
dict_series = jsontools.get_node_from_file(item.from_channel, TAG_TVSHOW_FILTER)
|
||||
tvshow = item.show.strip().lower()
|
||||
|
||||
logger.info("Data is updated")
|
||||
logger.log("Data is updated")
|
||||
|
||||
list_quality = []
|
||||
for _id, value in list(dict_data_saved.items()):
|
||||
@@ -599,7 +599,7 @@ def save_from_context(item):
|
||||
@param item: item
|
||||
@type item: item
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
dict_series = jsontools.get_node_from_file(item.from_channel, TAG_TVSHOW_FILTER)
|
||||
tvshow = item.show.strip().lower()
|
||||
@@ -630,7 +630,7 @@ def delete_from_context(item):
|
||||
@param item: item
|
||||
@type item: item
|
||||
"""
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# We come from get_links and no result has been obtained, in context menu and we delete
|
||||
if item.to_channel != "":
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ if config.is_xbmc():
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
|
||||
if config.is_xbmc():
|
||||
|
||||
@@ -1225,7 +1225,7 @@ class related(xbmcgui.WindowDialog):
|
||||
|
||||
|
||||
def busqueda_global(item, infoLabels, org_title=False):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
logger.debug(item)
|
||||
|
||||
@@ -1797,7 +1797,7 @@ class ActorInfo(xbmcgui.WindowDialog):
|
||||
xbmc.sleep(400)
|
||||
if exit_loop:
|
||||
break
|
||||
logger.info("salimos carajo xD")
|
||||
logger.log("salimos carajo xD")
|
||||
|
||||
def onAction(self, action):
|
||||
global exit_loop
|
||||
|
||||
+25
-25
@@ -126,7 +126,7 @@ class KodfavouritesData(object):
|
||||
# ============================
|
||||
|
||||
def addFavourite(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
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.log()
|
||||
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.log()
|
||||
alfav = KodfavouritesData()
|
||||
|
||||
itemlist = []
|
||||
@@ -289,7 +289,7 @@ def _crea_perfil(alfav):
|
||||
# Profile and link management
|
||||
|
||||
def crear_perfil(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
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.log()
|
||||
itemlist = []
|
||||
item.category = 'Listas'
|
||||
|
||||
@@ -619,7 +619,7 @@ def mainlist_listas(item):
|
||||
|
||||
|
||||
def acciones_lista(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
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.log()
|
||||
|
||||
itemlist = []
|
||||
# list_canales, any_active = get_channels_list()
|
||||
@@ -128,7 +128,7 @@ def set_category_context(item):
|
||||
|
||||
|
||||
def get_channels_list():
|
||||
logger.info()
|
||||
logger.log()
|
||||
## 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.log()
|
||||
item.mode = 'set_cache'
|
||||
t = Thread(target=novedades, args=[item])
|
||||
t.start()
|
||||
#t.join()
|
||||
|
||||
def get_from_cache(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
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.log()
|
||||
|
||||
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.log()
|
||||
|
||||
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.log("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.log("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.log("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.log("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.log(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.log("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.log("running channel " + modulo.__name__ + " " + modulo.__file__)
|
||||
list_result = modulo.newest(categoria)
|
||||
logger.info("canal= %s %d resultados" % (channel_id, len(list_result)))
|
||||
logger.log("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.log("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.log()
|
||||
global channels_id_name
|
||||
channels_id_name = item.extra
|
||||
itemlist = []
|
||||
|
||||
@@ -65,13 +65,13 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
try:
|
||||
self.cur.execute('select ip from dnscache where domain=?', (domain,))
|
||||
ip = self.cur.fetchall()[0][0]
|
||||
logger.info('Cache DNS: ' + domain + ' = ' + str(ip))
|
||||
logger.log('Cache DNS: ' + domain + ' = ' + str(ip))
|
||||
except:
|
||||
pass
|
||||
if not ip: # not cached
|
||||
try:
|
||||
ip = doh.query(domain)[0]
|
||||
logger.info('Query DoH: ' + domain + ' = ' + str(ip))
|
||||
logger.log('Query DoH: ' + domain + ' = ' + str(ip))
|
||||
self.writeToCache(domain, ip)
|
||||
except Exception:
|
||||
logger.error('Failed to resolve hostname, fallback to normal dns')
|
||||
@@ -132,8 +132,8 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
try:
|
||||
ret = super(CipherSuiteAdapter, self).send(request, **kwargs)
|
||||
except Exception as e:
|
||||
logger.info('Request for ' + domain + ' with ip ' + ip + ' failed')
|
||||
logger.info(e)
|
||||
logger.log('Request for ' + domain + ' with ip ' + ip + ' failed')
|
||||
logger.log(e)
|
||||
# if 'SSLError' in str(e):
|
||||
# # disabilito
|
||||
# config.set_setting("resolver_dns", False)
|
||||
@@ -142,7 +142,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter):
|
||||
# else:
|
||||
tryFlush = True
|
||||
if tryFlush and not flushedDns: # re-request ips and update cache
|
||||
logger.info('Flushing dns cache for ' + domain)
|
||||
logger.log('Flushing dns cache for ' + domain)
|
||||
return self.flushDns(request, domain, **kwargs)
|
||||
ret.url = realUrl
|
||||
else:
|
||||
|
||||
+10
-10
@@ -31,7 +31,7 @@ def_lang = info_language[config.get_setting("info_language", "videolibrary")]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
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")),
|
||||
@@ -47,7 +47,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def sub_menu(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
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")),
|
||||
@@ -66,7 +66,7 @@ def sub_menu(item):
|
||||
|
||||
|
||||
def saved_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = list()
|
||||
saved_searches_list = get_saved_searches()
|
||||
@@ -93,7 +93,7 @@ def saved_search(item):
|
||||
|
||||
|
||||
def new_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
temp_search_file = config.get_temp_file('temp-search')
|
||||
if filetools.isfile(temp_search_file):
|
||||
@@ -163,7 +163,7 @@ def new_search(item):
|
||||
|
||||
|
||||
def channel_search(item):
|
||||
logger.info(item)
|
||||
logger.log(item)
|
||||
|
||||
start = time.time()
|
||||
searching = list()
|
||||
@@ -389,14 +389,14 @@ def get_servers(item, module_dict):
|
||||
|
||||
|
||||
def get_info(itemlist):
|
||||
logger.info()
|
||||
logger.log()
|
||||
tmdb.set_infoLabels_itemlist(itemlist, True, forced=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_channels(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
channels_list = list()
|
||||
title_list = list()
|
||||
@@ -717,7 +717,7 @@ def discover_list(item):
|
||||
|
||||
|
||||
def from_context(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
select = setting_channel_new(item)
|
||||
|
||||
@@ -738,7 +738,7 @@ def from_context(item):
|
||||
|
||||
|
||||
def set_context(itemlist):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
for elem in itemlist:
|
||||
elem.context = [{"title": config.get_localized_string(60412),
|
||||
@@ -755,7 +755,7 @@ def set_context(itemlist):
|
||||
|
||||
|
||||
def get_from_temp(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
n = 30
|
||||
nTotal = len(item.itemlist)
|
||||
|
||||
+22
-22
@@ -21,7 +21,7 @@ CHANNELNAME = "setting"
|
||||
AUTOSTART = config.is_autorun_enabled()
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = list()
|
||||
itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60535), action="settings", folder=False,
|
||||
@@ -62,7 +62,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def menu_channels(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60545), action="conf_tools", folder=False,
|
||||
@@ -98,15 +98,15 @@ def channel_config(item):
|
||||
|
||||
def autostart(item): # item required launcher.py line 265
|
||||
if config.enable_disable_autorun(AUTOSTART):
|
||||
logger.info('AUTOSTART ENABLED')
|
||||
logger.log('AUTOSTART ENABLED')
|
||||
# xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70709))
|
||||
else:
|
||||
logger.info('AUTOSTART ENABLED')
|
||||
logger.log('AUTOSTART ENABLED')
|
||||
# xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70710))
|
||||
|
||||
|
||||
# def setting_torrent(item):
|
||||
# logger.info()
|
||||
# logger.log()
|
||||
|
||||
# LIBTORRENT_PATH = config.get_setting("libtorrent_path", server="torrent", default="")
|
||||
# LIBTORRENT_ERROR = config.get_setting("libtorrent_error", server="torrent", default="")
|
||||
@@ -243,7 +243,7 @@ def autostart(item): # item required launcher.py line 265
|
||||
# config.set_setting("magnet2torrent", dict_data_saved["magnet2torrent"], server="torrent")
|
||||
|
||||
def menu_servers(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60550), action="servers_blacklist", folder=False,
|
||||
@@ -272,7 +272,7 @@ def menu_servers(item):
|
||||
|
||||
for server in sorted(server_list):
|
||||
server_parameters = servertools.get_server_parameters(server)
|
||||
logger.info(server_parameters)
|
||||
logger.log(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"],
|
||||
@@ -423,7 +423,7 @@ def settings(item):
|
||||
|
||||
|
||||
def submenu_tools(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = list()
|
||||
|
||||
# Custom tools
|
||||
@@ -464,7 +464,7 @@ def submenu_tools(item):
|
||||
|
||||
|
||||
def check_quickfixes(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if not config.dev_mode():
|
||||
from platformcode import updater
|
||||
@@ -475,7 +475,7 @@ def check_quickfixes(item):
|
||||
|
||||
|
||||
# def update_quasar(item):
|
||||
# logger.info()
|
||||
# logger.log()
|
||||
|
||||
# from platformcode import custom_code, platformtools
|
||||
# stat = False
|
||||
@@ -487,7 +487,7 @@ def check_quickfixes(item):
|
||||
|
||||
|
||||
def conf_tools(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# Enable or disable channels
|
||||
if item.extra == "channels_onoff":
|
||||
@@ -589,14 +589,14 @@ def conf_tools(item):
|
||||
action="", folder=False,
|
||||
thumbnail=channel.thumbnail))
|
||||
continue
|
||||
# logger.info(channel.channel + " SALTADO!")
|
||||
# logger.log(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.log(channel.channel + " Has _data.json file")
|
||||
channeljson_exists = True
|
||||
# We get saved settings from ../settings/channel_data.json
|
||||
try:
|
||||
@@ -606,7 +606,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.log(channel.channel + " No _data.json file")
|
||||
channeljson_exists = False
|
||||
|
||||
if channeljson_exists:
|
||||
@@ -626,7 +626,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.log(channel.title + " | Default: %s" % default_settings)
|
||||
except:
|
||||
import traceback
|
||||
logger.error(channel.title + config.get_localized_string(60570) % traceback.format_exc())
|
||||
@@ -648,7 +648,7 @@ def conf_tools(item):
|
||||
list_status = config.get_localized_string(60571)
|
||||
|
||||
else:
|
||||
# logger.info(channel.channel + " - NO correction needed!")
|
||||
# logger.log(channel.channel + " - NO correction needed!")
|
||||
needsfix = False
|
||||
|
||||
# If the channel status has been set it is added to the list
|
||||
@@ -747,7 +747,7 @@ def channel_status(item, dict_values):
|
||||
for k in dict_values:
|
||||
|
||||
if k == "all_channels":
|
||||
logger.info("All channels | Selected state: %s" % dict_values[k])
|
||||
logger.log("All channels | Selected state: %s" % dict_values[k])
|
||||
if dict_values[k] != 0:
|
||||
excluded_channels = ['url', 'search',
|
||||
'videolibrary', 'setting',
|
||||
@@ -788,9 +788,9 @@ def channel_status(item, dict_values):
|
||||
continue
|
||||
|
||||
else:
|
||||
logger.info("Channel: %s | State: %s" % (k, dict_values[k]))
|
||||
logger.log("Channel: %s | State: %s" % (k, dict_values[k]))
|
||||
config.set_setting("enabled", dict_values[k], k)
|
||||
logger.info("the value is like %s " % config.get_setting("enabled", k))
|
||||
logger.log("the value is like %s " % config.get_setting("enabled", k))
|
||||
|
||||
platformtools.itemlist_update(Item(channel=CHANNELNAME, action="mainlist"))
|
||||
|
||||
@@ -878,7 +878,7 @@ def restore_tools(item):
|
||||
|
||||
|
||||
def report_menu(item):
|
||||
logger.info('URL: ' + item.url)
|
||||
logger.log('URL: ' + item.url)
|
||||
|
||||
from channelselector import get_thumb
|
||||
|
||||
@@ -951,7 +951,7 @@ def report_menu(item):
|
||||
|
||||
|
||||
def activate_debug(item):
|
||||
logger.info(item.extra)
|
||||
logger.log(item.extra)
|
||||
from platformcode import platformtools
|
||||
|
||||
#Enable / disable DEBUB option in settings.xml
|
||||
@@ -1231,7 +1231,7 @@ def report_send(item, description='', fatal=False):
|
||||
continue
|
||||
|
||||
status = True # Upload operation completed successfully
|
||||
logger.info('Report created: ' + str(item.url)) # The URL of the user report is saved
|
||||
logger.log('Report created: ' + str(item.url)) # The URL of the user report is saved
|
||||
# if fatal: # For future use, for logger.crash
|
||||
# platformtools.dialog_ok('KoD CREATED ERROR report', 'Report it in the forum by adding FATAL ERROR and this URL: ', '[COLOR gold]%s[/COLOR]' % item.url, pastebin_one_use_msg)
|
||||
# else: # Report URL passed to user
|
||||
|
||||
@@ -126,7 +126,7 @@ def SettingOnPosition(item):
|
||||
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.kod)')
|
||||
category = item.category if item.category else 0
|
||||
setting = item.setting if item.setting else 0
|
||||
logger.info('SETTING= ' + str(setting))
|
||||
logger.log('SETTING= ' + str(setting))
|
||||
xbmc.executebuiltin('SetFocus(%i)' % (category - 100))
|
||||
xbmc.executebuiltin('SetFocus(%i)' % (setting - 80))
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ def set_menu_settings(item):
|
||||
jsontools.update_node(menu_node, 'menu_settings_data.json', "menu")
|
||||
|
||||
def check_user_home(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
if os.path.exists(menu_settings_path):
|
||||
menu_node = jsontools.get_node_from_file('menu_settings_data.json', 'menu')
|
||||
if 'user_home' in menu_node:
|
||||
@@ -56,7 +56,7 @@ def check_user_home(item):
|
||||
return item
|
||||
|
||||
def set_custom_start(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
if os.path.exists(menu_settings_path):
|
||||
menu_node = jsontools.get_node_from_file('menu_settings_data.json', 'menu')
|
||||
else:
|
||||
@@ -70,7 +70,7 @@ def set_custom_start(item):
|
||||
jsontools.update_node(menu_node, 'menu_settings_data.json', "menu")
|
||||
|
||||
def get_start_page():
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
dictCategory = {
|
||||
config.get_localized_string(70137): 'peliculas',
|
||||
@@ -357,7 +357,7 @@ class Main(xbmcgui.WindowXMLDialog):
|
||||
self.focus -= 1
|
||||
|
||||
def run_action(self, item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
if item.menu != True:
|
||||
self.close()
|
||||
xbmc.executebuiltin("Container.update(%s)"%launcher.run(item))
|
||||
|
||||
+10
-10
@@ -45,7 +45,7 @@ else:
|
||||
|
||||
|
||||
def buscartrailer(item, trailers=[]):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# List of actions if run from context menu
|
||||
if item.action == "manual_search" and item.contextual:
|
||||
@@ -80,8 +80,8 @@ def buscartrailer(item, trailers=[]):
|
||||
|
||||
item.year = item.infoLabels['year']
|
||||
|
||||
logger.info("Search: %s" % item.contentTitle)
|
||||
logger.info("Year: %s" % item.year)
|
||||
logger.log("Search: %s" % item.contentTitle)
|
||||
logger.log("Year: %s" % item.year)
|
||||
if item.infoLabels['trailer'] and not trailers:
|
||||
url = item.infoLabels['trailer']
|
||||
if "youtube" in url:
|
||||
@@ -127,7 +127,7 @@ def buscartrailer(item, trailers=[]):
|
||||
|
||||
|
||||
def manual_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
texto = platformtools.dialog_input(default=item.contentTitle, heading=config.get_localized_string(30112))
|
||||
if texto is not None:
|
||||
if item.extra == "abandomoviez":
|
||||
@@ -139,7 +139,7 @@ def manual_search(item):
|
||||
|
||||
|
||||
def tmdb_trailers(item, tipo="movie"):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
from core.tmdb import Tmdb
|
||||
itemlist = []
|
||||
@@ -158,7 +158,7 @@ def tmdb_trailers(item, tipo="movie"):
|
||||
|
||||
|
||||
def youtube_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
titulo = item.contentTitle
|
||||
if item.extra != "youtube":
|
||||
@@ -202,7 +202,7 @@ def youtube_search(item):
|
||||
|
||||
|
||||
def abandomoviez_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# Check if it is a zero search or comes from the Next option
|
||||
if item.page != "":
|
||||
@@ -253,7 +253,7 @@ def abandomoviez_search(item):
|
||||
|
||||
|
||||
def search_links_abando(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
data = httptools.downloadpage(item.url).data
|
||||
itemlist = []
|
||||
if "Lo sentimos, no tenemos trailer" in data:
|
||||
@@ -308,7 +308,7 @@ def search_links_abando(item):
|
||||
|
||||
|
||||
def filmaffinity_search(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if item.filmaffinity:
|
||||
item.url = item.filmaffinity
|
||||
@@ -363,7 +363,7 @@ def filmaffinity_search(item):
|
||||
|
||||
|
||||
def search_links_filmaff(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
+17
-17
@@ -31,11 +31,11 @@ adult_mal = config.get_setting('adult_mal', "tvmoviedb")
|
||||
mal_ck = "MzE1MDQ2cGQ5N2llYTY4Z2xwbGVzZjFzbTY="
|
||||
images_predef = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/"
|
||||
default_fan = filetools.join(config.get_runtime_path(), "fanart.jpg")
|
||||
logger.info('FANART= '+default_fan)
|
||||
logger.log('FANART= '+default_fan)
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
# TMDB
|
||||
itemlist.append(item.clone(title=typo(config.get_localized_string(70021), 'bold'), action=""))
|
||||
@@ -72,7 +72,7 @@ def configuracion(item):
|
||||
return ret
|
||||
|
||||
def search_star(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = []
|
||||
item.type='movie'
|
||||
@@ -114,7 +114,7 @@ def search_(item):
|
||||
|
||||
|
||||
def busqueda(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
new_item = Item(title=item.contentTitle, text=item.contentTitle.replace("+", " "), mode=item.contentType, infoLabels=item.infoLabels)
|
||||
|
||||
@@ -734,7 +734,7 @@ def indices_tmdb(item):
|
||||
|
||||
|
||||
def filtro(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
from datetime import datetime
|
||||
list_controls = []
|
||||
@@ -833,7 +833,7 @@ def filtrado(item, values):
|
||||
|
||||
|
||||
def musica_movie(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
@@ -954,7 +954,7 @@ def listado_imdb(item):
|
||||
|
||||
|
||||
def filtro_imdb(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
from datetime import datetime
|
||||
list_controls = []
|
||||
@@ -1561,7 +1561,7 @@ def detalles_fa(item):
|
||||
|
||||
|
||||
def filtro_fa(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
from datetime import datetime
|
||||
list_controls = []
|
||||
@@ -1663,7 +1663,7 @@ def filtrado_fa(item, values):
|
||||
|
||||
|
||||
def login_fa():
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
try:
|
||||
user = config.get_setting("usuariofa", "tvmoviedb")
|
||||
@@ -1688,7 +1688,7 @@ def login_fa():
|
||||
userid = scrapertools.find_single_match(data, 'id-user=(\d+)')
|
||||
if userid:
|
||||
config.set_setting("userid", userid, "tvmoviedb")
|
||||
logger.info("Login correcto")
|
||||
logger.log("Login correcto")
|
||||
return True, ""
|
||||
except:
|
||||
import traceback
|
||||
@@ -1813,7 +1813,7 @@ def acciones_fa(item):
|
||||
|
||||
def votar_fa(item):
|
||||
# Window to select the vote
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
list_controls = []
|
||||
valores = {}
|
||||
@@ -2215,7 +2215,7 @@ def acciones_trakt(item):
|
||||
|
||||
|
||||
def order_list(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
list_controls = []
|
||||
valores1 = ['rating', 'added', 'title', 'released', 'runtime', 'popularity', 'percentage', 'votes']
|
||||
@@ -2956,7 +2956,7 @@ def info_anidb(item, itemlist, url):
|
||||
|
||||
|
||||
def filtro_mal(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
list_controls = []
|
||||
valores = {}
|
||||
@@ -3040,7 +3040,7 @@ def callback_mal(item, values):
|
||||
|
||||
def musica_anime(item):
|
||||
# List available anime and songs similar to the anime title
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage("http://www.freeanimemusic.org/song_search.php", post=item.post).data
|
||||
@@ -3076,7 +3076,7 @@ def musica_anime(item):
|
||||
|
||||
|
||||
def login_mal(from_list=False):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
try:
|
||||
user = config.get_setting("usuariomal", "tvmoviedb")
|
||||
@@ -3103,7 +3103,7 @@ def login_mal(from_list=False):
|
||||
else:
|
||||
if generic:
|
||||
return False, config.get_localized_string(70381), user
|
||||
logger.info("Login correcto")
|
||||
logger.log("Login correcto")
|
||||
return True, "", user
|
||||
except:
|
||||
import traceback
|
||||
@@ -3135,7 +3135,7 @@ def cuenta_mal(item):
|
||||
|
||||
def items_mal(item):
|
||||
# Scraper for personal lists
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| ", "", data)
|
||||
|
||||
+40
-45
@@ -8,7 +8,6 @@ if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
import xbmc, os, traceback
|
||||
|
||||
from channelselector import get_thumb
|
||||
from core import filetools, scrapertools, videolibrarytools
|
||||
from core.support import typo, thumb
|
||||
from core.item import Item
|
||||
@@ -22,18 +21,14 @@ else:
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
itemlist = [Item(channel=item.channel, action="list_movies", title=config.get_localized_string(60509),
|
||||
category=config.get_localized_string(70270),
|
||||
thumbnail=get_thumb("videolibrary_movie.png")),
|
||||
Item(channel=item.channel, action="list_tvshows", title=config.get_localized_string(60600),
|
||||
category=config.get_localized_string(70271),
|
||||
thumbnail=get_thumb("videolibrary_tvshow.png"),
|
||||
category=config.get_localized_string(70270), thumbnail=thumb("videolibrary_movie")),
|
||||
Item(channel=item.channel, action="list_tvshows",title=config.get_localized_string(60600),
|
||||
category=config.get_localized_string(70271), thumbnail=thumb("videolibrary_tvshow"),
|
||||
context=[{"channel":"videolibrary", "action":"update_videolibrary", "title":config.get_localized_string(70269)}]),
|
||||
Item(channel='shortcuts', action="SettingOnPosition",
|
||||
category=2, setting=1, title=typo(config.get_localized_string(70287),'bold color kod'),
|
||||
thumbnail = get_thumb("setting_0.png"))]
|
||||
Item(channel='shortcuts', action="SettingOnPosition", category=2, setting=1, thumbnail = thumb("setting_0"))]
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -42,7 +37,7 @@ def channel_config(item):
|
||||
|
||||
|
||||
def list_movies(item, silent=False):
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
movies_path = []
|
||||
for root, folders, files in filetools.walk(videolibrarytools.MOVIES_PATH):
|
||||
@@ -68,7 +63,7 @@ def list_movies(item, silent=False):
|
||||
def list_tvshows(item):
|
||||
from time import time
|
||||
start = time()
|
||||
logger.info()
|
||||
logger.log()
|
||||
itemlist = []
|
||||
lista = []
|
||||
tvshows_path = []
|
||||
@@ -93,7 +88,7 @@ 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))
|
||||
logger.log('TEMPO= ' + str(time() - start))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -192,7 +187,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.log('item\n' + str(item))
|
||||
if visto > 0:
|
||||
seen_text = config.get_localized_string(60020)
|
||||
counter = 0
|
||||
@@ -264,7 +259,7 @@ def configure_update_videolibrary(item):
|
||||
|
||||
|
||||
def get_seasons(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
itemlist = []
|
||||
dict_temp = {}
|
||||
@@ -323,7 +318,7 @@ def get_seasons(item):
|
||||
|
||||
|
||||
def get_episodes(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
itemlist = []
|
||||
|
||||
@@ -387,7 +382,7 @@ def get_episodes(item):
|
||||
|
||||
def findvideos(item):
|
||||
from specials import autoplay
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
videolibrarytools.check_renumber_options(item)
|
||||
itemlist = []
|
||||
@@ -540,7 +535,7 @@ def findvideos(item):
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
if not item.contentChannel == "local":
|
||||
@@ -580,7 +575,7 @@ def play(item):
|
||||
|
||||
|
||||
def update_videolibrary(item=''):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
# Update active series by overwriting
|
||||
import service
|
||||
@@ -600,17 +595,17 @@ 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.log()
|
||||
|
||||
backup_current_path = current_path
|
||||
backup_new_path = new_path
|
||||
|
||||
logger.info('current_path: ' + current_path)
|
||||
logger.info('new_path: ' + new_path)
|
||||
logger.info('current_movies_folder: ' + current_movies_folder)
|
||||
logger.info('new_movies_folder: ' + new_movies_folder)
|
||||
logger.info('current_tvshows_folder: ' + current_tvshows_folder)
|
||||
logger.info('new_tvshows_folder: ' + new_tvshows_folder)
|
||||
logger.log('current_path: ' + current_path)
|
||||
logger.log('new_path: ' + new_path)
|
||||
logger.log('current_movies_folder: ' + current_movies_folder)
|
||||
logger.log('new_movies_folder: ' + new_movies_folder)
|
||||
logger.log('current_tvshows_folder: ' + current_tvshows_folder)
|
||||
logger.log('new_tvshows_folder: ' + new_tvshows_folder)
|
||||
|
||||
notify = False
|
||||
progress = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(80011))
|
||||
@@ -621,14 +616,14 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
|
||||
current_tvshows_path = u'' + filetools.join(current_path, current_tvshows_folder)
|
||||
new_tvshows_path = u'' + filetools.join(new_path, new_tvshows_folder)
|
||||
|
||||
logger.info('current_movies_path: ' + current_movies_path)
|
||||
logger.info('new_movies_path: ' + new_movies_path)
|
||||
logger.info('current_tvshows_path: ' + current_tvshows_path)
|
||||
logger.info('new_tvshows_path: ' + new_tvshows_path)
|
||||
logger.log('current_movies_path: ' + current_movies_path)
|
||||
logger.log('new_movies_path: ' + new_movies_path)
|
||||
logger.log('current_tvshows_path: ' + current_tvshows_path)
|
||||
logger.log('new_tvshows_path: ' + new_tvshows_path)
|
||||
|
||||
from platformcode import xbmc_videolibrary
|
||||
movies_path, tvshows_path = xbmc_videolibrary.check_sources(new_movies_path, new_tvshows_path)
|
||||
logger.info('check_sources: ' + str(movies_path) + ', ' + str(tvshows_path))
|
||||
logger.log('check_sources: ' + str(movies_path) + ', ' + str(tvshows_path))
|
||||
if movies_path or tvshows_path:
|
||||
if not movies_path:
|
||||
filetools.rmdir(new_movies_path)
|
||||
@@ -673,7 +668,7 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
|
||||
|
||||
|
||||
def delete_videolibrary(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if not platformtools.dialog_yesno(config.get_localized_string(20000), config.get_localized_string(80037)):
|
||||
return
|
||||
@@ -699,7 +694,7 @@ def delete_videolibrary(item):
|
||||
|
||||
# context menu methods
|
||||
def update_tvshow(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
heading = config.get_localized_string(60037)
|
||||
@@ -725,11 +720,11 @@ def update_tvshow(item):
|
||||
|
||||
|
||||
def add_local_episodes(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
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.log("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)
|
||||
@@ -744,7 +739,7 @@ def add_local_episodes(item):
|
||||
|
||||
|
||||
def remove_local_episodes(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
nfo_path = filetools.join(item.path, "tvshow.nfo")
|
||||
head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path)
|
||||
@@ -762,7 +757,7 @@ def remove_local_episodes(item):
|
||||
|
||||
|
||||
def verify_playcount_series(item, path):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
"""
|
||||
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
|
||||
@@ -825,7 +820,7 @@ def verify_playcount_series(item, path):
|
||||
|
||||
|
||||
def mark_content_as_watched2(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
if filetools.isfile(item.nfo):
|
||||
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
|
||||
@@ -863,7 +858,7 @@ def mark_content_as_watched2(item):
|
||||
|
||||
|
||||
def mark_content_as_watched(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
#logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
if filetools.exists(item.nfo):
|
||||
@@ -901,7 +896,7 @@ def mark_content_as_watched(item):
|
||||
|
||||
|
||||
def mark_season_as_watched(item):
|
||||
logger.info()
|
||||
logger.log()
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
|
||||
# Get dictionary of marked episodes
|
||||
@@ -954,7 +949,7 @@ def mark_season_as_watched(item):
|
||||
|
||||
|
||||
def mark_tvshow_as_updatable(item, silent=False):
|
||||
logger.info()
|
||||
logger.log()
|
||||
head_nfo, it = videolibrarytools.read_nfo(item.nfo)
|
||||
it.active = item.active
|
||||
filetools.write(item.nfo, head_nfo + it.tojson())
|
||||
@@ -987,7 +982,7 @@ def delete(item):
|
||||
elif platformtools.dialog_yesno(heading, config.get_localized_string(70081) % filetools.basename(_item.path)):
|
||||
filetools.rmdirtree(_item.path)
|
||||
|
||||
logger.info("All links removed")
|
||||
logger.log("All links removed")
|
||||
xbmc.sleep(1000)
|
||||
platformtools.itemlist_refresh()
|
||||
|
||||
@@ -1058,7 +1053,7 @@ def delete(item):
|
||||
filetools.write(item.nfo, head_nfo + item_nfo.tojson())
|
||||
|
||||
msg_txt = config.get_localized_string(70087) % (num_enlaces, canal)
|
||||
logger.info(msg_txt)
|
||||
logger.log(msg_txt)
|
||||
platformtools.dialog_notification(heading, msg_txt)
|
||||
platformtools.itemlist_refresh()
|
||||
|
||||
@@ -1068,7 +1063,7 @@ def delete(item):
|
||||
|
||||
|
||||
def check_season_playcount(item, season):
|
||||
logger.info()
|
||||
logger.log()
|
||||
|
||||
if season:
|
||||
episodios_temporada = 0
|
||||
@@ -1090,7 +1085,7 @@ def check_season_playcount(item, season):
|
||||
|
||||
|
||||
def check_tvshow_playcount(item, season):
|
||||
logger.info()
|
||||
logger.log()
|
||||
if season:
|
||||
temporadas_serie = 0
|
||||
temporadas_vistas_serie = 0
|
||||
|
||||
Reference in New Issue
Block a user