diff --git a/channels/animeworld.py b/channels/animeworld.py index dbea46f0..fb63849e 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -164,7 +164,12 @@ def findvideos(item): else: dataJson = support.httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, ID, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data json = jsontools.load(dataJson) - videoData +='\n'+json['grabber'] + if 'keepsetsu' in json['grabber']: + matches = support.match(item, r' 0: platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60069)) - logger.error("No se han podido añadir %s episodios de la serie %s a la videoteca" % (fallidos, item.show)) + logger.error("Could not add %s episodes of the %s series to the video library" % (fallidos, item.show)) else: platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60070)) - logger.info("Se han añadido %s episodios de la serie %s a la videoteca" % + logger.info("%s episodes of the %s series have been added to the video library" % (insertados, item.show)) if config.is_xbmc(): if config.get_setting("sync_trakt_new_tvshow", "videolibrary"): @@ -886,7 +886,7 @@ def emergency_urls(item, channel=None, path=None): item_res.category = channel_save.capitalize() #... y la categoría del item_res.videolibray_emergency_urls #... y se borra la marca de lookup except: - logger.error('ERROR al procesar el título en Findvideos del Canal: ' + item.channel + ' / ' + item.title) + logger.error('ERROR when processing the title in Findvideos del Canal: ' + item.channel + ' / ' + item.title) logger.error(traceback.format_exc()) item_res = item.clone() #Si ha habido un error, se devuelve el Item original if item_res.videolibray_emergency_urls: @@ -929,7 +929,7 @@ def emergency_urls(item, channel=None, path=None): item_res.url = item.url except: - logger.error('ERROR al cachear el .torrent de: ' + item.channel + ' / ' + item.title) + logger.error('ERROR when caching the .torrent of: ' + item.channel + ' / ' + item.title) logger.error(traceback.format_exc()) item_res = item.clone() #Si ha habido un error, se devuelve el Item original @@ -966,7 +966,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 torrents_path_encode = filetools.encode(torrents_path) #encode utf-8 del path if url.endswith(".rar") or url.startswith("magnet:"): #No es un archivo .torrent - logger.error('No es un archivo Torrent: ' + url) + logger.error('It is not a Torrent file: ' + url) torrents_path = '' if data_torrent: return (torrents_path, torrent_file) @@ -979,7 +979,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 else: #Descarga sin post response = httptools.downloadpage(url, timeout=timeout) if not response.sucess: - logger.error('Archivo .torrent no encontrado: ' + url) + logger.error('.Torrent file not found: ' + url) torrents_path = '' if data_torrent: return (torrents_path, torrent_file) @@ -998,7 +998,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 #Si es un archivo .ZIP tratamos de extraer el contenido if torrent_file.startswith("PK"): - logger.info('Es un archivo .ZIP: ' + url) + logger.info('It is a .ZIP file: ' + url) torrents_path_zip = filetools.join(videolibrary_path, 'temp_torrents_zip') #Carpeta de trabajo torrents_path_zip = filetools.encode(torrents_path_zip) @@ -1031,7 +1031,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 #Si no es un archivo .torrent (RAR, HTML,..., vacío) damos error if not scrapertools.find_single_match(torrent_file, '^d\d+:.*?\d+:'): - logger.error('No es un archivo Torrent: ' + url) + logger.error('It is not a Torrent file: ' + url) torrents_path = '' if data_torrent: return (torrents_path, torrent_file) @@ -1040,7 +1040,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 #Salvamos el .torrent if not lookup: if not filetools.write(torrents_path_encode, torrent_file): - logger.error('ERROR: Archivo .torrent no escrito: ' + torrents_path_encode) + logger.error('ERROR: Unwritten .torrent file: ' + torrents_path_encode) torrents_path = '' #Si hay un error, devolvemos el "path" vacío torrent_file = '' #... y el buffer del .torrent if data_torrent: @@ -1049,7 +1049,7 @@ def caching_torrents(url, referer=None, post=None, torrents_path=None, timeout=1 except: torrents_path = '' #Si hay un error, devolvemos el "path" vacío torrent_file = '' #... y el buffer del .torrent - logger.error('Error en el proceso de descarga del .torrent: ' + url + ' / ' + torrents_path_encode) + logger.error('ERROR: .Torrent download process failed: ' + url + ' / ' + torrents_path_encode) logger.error(traceback.format_exc()) #logger.debug(torrents_path) diff --git a/specials/setting.py b/specials/setting.py index eca3acd3..40ae0042 100644 --- a/specials/setting.py +++ b/specials/setting.py @@ -25,7 +25,7 @@ def mainlist(item): else: autostart_mode = config.get_localized_string(70708) itemlist.append(Item(channel=CHANNELNAME, title=autostart_mode + " " + config.get_localized_string(70706), action="autostart", folder=False, thumbnail=get_thumb("setting_0.png"))) - + #itemlist.append(Item(channel=CHANNELNAME, title="", action="", folder=False, thumbnail=get_thumb("setting_0.png"))) itemlist.append(Item(channel=CHANNELNAME, title=config.get_localized_string(60536) + ":", text_bold=True, action="", folder=False, @@ -340,8 +340,8 @@ def submenu_tools(item): def check_quickfixes(item): - logger.info() - + logger.info() + if not config.dev_mode(): from platformcode import updater return updater.check_addon_init() @@ -351,7 +351,7 @@ def check_quickfixes(item): def update_quasar(item): logger.info() - + from platformcode import custom_code, platformtools stat = False stat = custom_code.update_external_addon("quasar") @@ -359,8 +359,8 @@ def update_quasar(item): platformtools.dialog_notification("Actualización Quasar", "Realizada con éxito") else: platformtools.dialog_notification("Actualización Quasar", "Ha fallado. Consulte el log") - - + + def conf_tools(item): logger.info() @@ -368,7 +368,7 @@ def conf_tools(item): if item.extra == "channels_onoff": if config.get_platform(True)['num_version'] >= 17.0: # A partir de Kodi 16 se puede usar multiselect, y de 17 con preselect return channels_onoff(item) - + import channelselector from core import channeltools @@ -686,6 +686,7 @@ def channel_status(item, dict_values): def overwrite_tools(item): import videolibrary_service from core import videolibrarytools + import os seleccion = platformtools.dialog_yesno(config.get_localized_string(60581), config.get_localized_string(60582), @@ -712,7 +713,9 @@ def overwrite_tools(item): continue # Eliminamos la carpeta con la serie ... - filetools.rmdirtree(path) + if tvshow_file.endswith('.strm') or tvshow_file.endswith('.json') or tvshow_file.endswith('.nfo'): + os.remove(os.path.join(path, tvshow_file)) + # filetools.rmdirtree(path) # ... y la volvemos a añadir videolibrary_service.update(path, p_dialog, i, t, serie, 3)