diff --git a/plugin.video.alfa/channels/videolibrary.json b/plugin.video.alfa/channels/videolibrary.json index 909f7563..23115606 100755 --- a/plugin.video.alfa/channels/videolibrary.json +++ b/plugin.video.alfa/channels/videolibrary.json @@ -8,38 +8,38 @@ { "id": "update", "type": "list", - "label": "Actualizar la videoteca", + "label": "$ADDON[plugin.video.alfa 60601]", "default": 1, "visible": true, "lvalues": [ - "Nunca", - "Al iniciar Kodi", - "Una sola vez al día", - "Al iniciar Kodi y al menos una vez al día" + "$ADDON[plugin.video.alfa 60602]", + "$ADDON[plugin.video.alfa 60603]", + "$ADDON[plugin.video.alfa 60604]", + "$ADDON[plugin.video.alfa 60605]" ] }, { "id": "update_wait", "type": "list", - "label": " Esperar antes de actualizar al iniciar kodi", + "label": "$ADDON[plugin.video.alfa 60606]", "default": 0, "visible": true, - "enabled": "eq(-1,Al iniciar Kodi)|eq(-1,Al iniciar Kodi y al menos una vez al día)", + "enabled": "eq(-1,$ADDON[plugin.video.alfa 60603])|eq(-1,$ADDON[plugin.video.alfa 60605])", "lvalues": [ "No", - "10 seg", - "20 seg", - "30 seg", - "60 seg" + "$ADDON[plugin.video.alfa 60609]", + "$ADDON[plugin.video.alfa 60610]", + "$ADDON[plugin.video.alfa 60611]", + "$ADDON[plugin.video.alfa 60612]" ] }, { "id": "everyday_delay", "type": "list", - "label": " Iniciar actualización programada a partir de las", + "label": "$ADDON[plugin.video.alfa 60613]", "default": 1, "visible": true, - "enabled": "eq(-2,Una sola vez al día)|eq(-2,Al iniciar Kodi y al menos una vez al día)", + "enabled": "eq(-2,$ADDON[plugin.video.alfa 60604])|eq(-2,$ADDON[plugin.video.alfa 60605])", "lvalues": [ "00:00", "04:00", @@ -50,37 +50,37 @@ { "id": "updatetvshows_interval", "type": "list", - "label": " Buscar nuevos episodios en las series activas", + "label": "$ADDON[plugin.video.alfa 60614]", "default": 0, "visible": true, - "enabled": "!eq(-3,Nunca)", + "enabled": "!eq(-3,$ADDON[plugin.video.alfa 60615])", "lvalues": [ - "Siempre", - "Según su emisión" + "$ADDON[plugin.video.alfa 60616]", + "$ADDON[plugin.video.alfa 60617]" ] }, { "id": "search_new_content", "type": "list", - "label": " Realizar búsqueda de contenido en", + "label": "[$ADDON[plugin.video.alfa 60618]", "default": 0, - "enabled": "!eq(-4,Nunca)", + "enabled": "!eq(-4,$ADDON[plugin.video.alfa 60615])", "lvalues": [ - "La carpeta de cada serie", - "Toda la videoteca" + "$ADDON[plugin.video.alfa 60619]", + "$ADDON[plugin.video.alfa 60620]" ] }, { "id": "addition", "type": "label", - "label": "Añadir a la videoteca", + "label": "$ADDON[plugin.video.alfa 70092]", "enabled": true, "visible": true }, { "id": "enable_filter", "type": "bool", - "label": " Excluir los streams que contienen etiquetas específicas", + "label": "$ADDON[plugin.video.alfa 70090]", "enabled": true, "visible": true, "default": false @@ -88,31 +88,32 @@ { "id": "filters", "type": "text", - "label": " Etiquetas", + "label": "$ADDON[plugin.video.alfa 70091]", "visible": true, "enabled": "eq(-1,true)" }, + { "id": "window_type", "type": "list", - "label": "Mostrar los enlaces en", - "default": 1, + "label": "$ADDON[plugin.video.alfa 60621]", + "default": 0, "enabled": true, "visible": true, "lvalues": [ - "Ventana convencional", - "Ventana emergente" + "$ADDON[plugin.video.alfa 60622]", + "$ADDON[plugin.video.alfa 60623]" ] }, { "id": "max_links", "type": "list", - "label": " Numero máximo de enlaces a mostrar (recomendable para equipos lentos)", + "label": "$ADDON[plugin.video.alfa 60624]", "default": 0, "enabled": true, "visible": true, "lvalues": [ - "Todos", + "$ADDON[plugin.video.alfa 60625]", "30", "60", "90", @@ -125,7 +126,7 @@ { "id": "white_list_order", "type": "bool", - "label": " Ordenar segun el orden de la lista blanca", + "label": "$ADDON[plugin.video.alfa 60626]", "enabled": true, "visible": true, "default": false @@ -133,7 +134,7 @@ { "id": "quit_channel_name", "type": "bool", - "label": " Quitar el nombre del canal del principio", + "label": "$ADDON[plugin.video.alfa 60627]", "enabled": true, "visible": true, "default": false @@ -141,7 +142,7 @@ { "id": "replace_VD", "type": "bool", - "label": " Ventana emergente: Reemplazar \"Ver en\" por \"[V]\" y \"Descargar en\" por \"[D]\"", + "label": "$ADDON[plugin.video.alfa 60628]", "enabled": true, "visible": true, "default": false @@ -149,33 +150,33 @@ { "id": "db_mode", "type": "list", - "label": "Ubicación de Base de datos", + "label": "$ADDON[plugin.video.alfa 60629]", "default": 0, "enabled": true, "visible": true, "lvalues": [ - "Local", - "Remota" + "$ADDON[plugin.video.alfa 60630]", + "$ADDON[plugin.video.alfa 60631]" ] }, { "id": "xbmc_host", "type": "text", - "label": " Nombre Servidor", + "label": "$ADDON[plugin.video.alfa 60632]", "visible": true, "enabled": "eq(-1,Remota)" }, { "id": "xbmc_puerto", "type": "text", - "label": " Puerto Servidor", + "label": "$ADDON[plugin.video.alfa 60633]", "enabled": "!eq(-1,'')", "visible": true }, { "id": "mark_as_watched", "type": "bool", - "label": "Marcar automáticamente como visto", + "label": "$ADDON[plugin.video.alfa 60634]", "default": true, "enabled": true, "visible": true @@ -183,7 +184,7 @@ { "id": "watched_setting", "type": "list", - "label": " Tiempo necesario del video", + "label": "$ADDON[plugin.video.alfa 60635]", "default": 3, "visible": true, "enabled": "eq(-1,true)", @@ -192,20 +193,20 @@ "30%", "50%", "80%", - "0 seg" + "$ADDON[plugin.video.alfa 60636]" ] }, { "id": "sync_trakt", "type": "label", - "label": "Sincronización con Trakt", + "label": "$ADDON[plugin.video.alfa 60637]", "enabled": true, "visible": true }, { "id": "sync_trakt_watched", "type": "bool", - "label": " Tras marcar como visto el episodio", + "label": "$ADDON[plugin.video.alfa 60638]", "default": false, "visible": true, "enabled": "eq(-3,true)" @@ -213,7 +214,7 @@ { "id": "sync_trakt_notification", "type": "bool", - "label": " Mostrar notificación", + "label": "$ADDON[plugin.video.alfa 60639]", "default": true, "visible": true, "enabled": "eq(-1,true)" @@ -221,7 +222,7 @@ { "id": "sync_trakt_new_tvshow", "type": "bool", - "label": " Al añadir una serie a la videoteca", + "label": "$ADDON[plugin.video.alfa 60640]", "default": false, "enabled": true, "visible": true @@ -229,7 +230,7 @@ { "id": "sync_trakt_new_tvshow_wait", "type": "bool", - "label": " Esperar a que se añada la serie a la videoteca", + "label": "$ADDON[plugin.video.alfa 60641]", "default": true, "visible": true, "enabled": "eq(-1,true)" @@ -237,57 +238,47 @@ { "id": "show_all_seasons", "type": "bool", - "label": "Mostrar la opción \"Todas las temporadas\"", + "label": "$ADDON[plugin.video.alfa 60642]", "default": true }, { "id": "no_pile_on_seasons", "type": "list", - "label": "No apilar temporadas de series", + "label": "$ADDON[plugin.video.alfa 60643]", "default": 1, "lvalues": [ - "Nunca", - "Sólo si hay una temporada", - "Siempre" + "$ADDON[plugin.video.alfa 60648]", + "$ADDON[plugin.video.alfa 60644]", + "$ADDON[plugin.video.alfa 60616]" ] }, { "id": "ask_channel", "type": "bool", - "label": "Mostrar cuadro de selección de canales", + "label": "$ADDON[plugin.video.alfa 60645]", "default": false }, { "id": "original_title_folder", "type": "list", - "label": "Crear directorios en el sistema usando", + "label": "$ADDON[plugin.video.alfa 60646]", "default": 0, "lvalues": [ - "Título localizado", - "Título original" - ] - }, - { - "id": "lowerize_title", - "type": "list", - "label": "Crear directorios con letras en miúsculas", - "default": 0, - "lvalues": [ - "Si", - "No" + "$ADDON[plugin.video.alfa 60647]", + "$ADDON[plugin.video.alfa 60649]" ] }, { "id": "lab_1", "type": "label", - "label": "Al añadir contenido, obtener información de:", + "label": "$ADDON[plugin.video.alfa 60650]", "enabled": true, "visible": true }, { "id": "scraper_movies", "type": "list", - "label": " Peliculas:", + "label": "$ADDON[plugin.video.alfa 60651]", "enabled": false, "default": 0, "lvalues": [ @@ -298,7 +289,7 @@ { "id": "scraper_tvshows", "type": "list", - "label": " Series:", + "label": "$ADDON[plugin.video.alfa 60652]", "default": 0, "lvalues": [ "TheMovieDB.org", @@ -308,7 +299,7 @@ { "id": "tvdb_retry_eng", "type": "bool", - "label": " Si no hay resultados buscar también en Inglés", + "label": "$ADDON[plugin.video.alfa 60653]", "default": true, "enabled": "eq(-1,TheTvDB.com)", "visible": true diff --git a/plugin.video.alfa/channels/videolibrary.py b/plugin.video.alfa/channels/videolibrary.py index 2374362b..303ae4f5 100644 --- a/plugin.video.alfa/channels/videolibrary.py +++ b/plugin.video.alfa/channels/videolibrary.py @@ -15,10 +15,10 @@ def mainlist(item): logger.info() itemlist = list() - itemlist.append(Item(channel=item.channel, action="list_movies", title="Películas", + itemlist.append(Item(channel=item.channel, action="list_movies", title=config.get_localized_string(60509), category="Videoteca de películas", thumbnail=get_thumb("videolibrary_movie.png"))) - itemlist.append(Item(channel=item.channel, action="list_tvshows", title="Series", + itemlist.append(Item(channel=item.channel, action="list_tvshows", title=config.get_localized_string(60600), category="Videoteca de series", thumbnail=get_thumb("videolibrary_tvshow.png"))) @@ -28,7 +28,7 @@ def mainlist(item): def channel_config(item): return platformtools.show_channel_settings(channelpath=os.path.join(config.get_runtime_path(), "channels", item.channel), - caption="configuración -- Videoteca") + caption=config.get_localized_string(60598)) def list_movies(item): @@ -54,10 +54,10 @@ def list_movies(item): visto = new_item.library_playcounts.get(os.path.splitext(f)[0], 0) new_item.infoLabels["playcount"] = visto if visto > 0: - texto_visto = "Marcar película como no vista" + texto_visto = config.get_localized_string(60016) contador = 0 else: - texto_visto = "Marcar película como vista" + texto_visto = config.get_localized_string(60017) contador = 1 # Menu contextual: Eliminar serie/canal @@ -65,10 +65,10 @@ def list_movies(item): if "downloads" in new_item.library_urls: num_canales -= 1 if num_canales > 1: - texto_eliminar = "Eliminar película/canal" + texto_eliminar = config.get_localized_string(60018) multicanal = True else: - texto_eliminar = "Eliminar esta película" + texto_eliminar = config.get_localized_string(60019) multicanal = False new_item.context = [{"title": texto_visto, @@ -107,19 +107,19 @@ def list_tvshows(item): visto = item_tvshow.library_playcounts.get(item_tvshow.contentTitle, 0) item_tvshow.infoLabels["playcount"] = visto if visto > 0: - texto_visto = "Marcar serie como no vista" + texto_visto = config.get_localized_string(60020) contador = 0 else: - texto_visto = "Marcar serie como vista" + texto_visto = config.get_localized_string(60021) contador = 1 # Menu contextual: Buscar automáticamente nuevos episodios o no if item_tvshow.active and int(item_tvshow.active) > 0: - texto_update = "Buscar automáticamente nuevos episodios: Desactivar" + texto_update = config.get_localized_string(60022) value = 0 item_tvshow.text_color = "green" else: - texto_update = "Buscar automáticamente nuevos episodios: Activar" + texto_update = config.get_localized_string(60023) value = 1 item_tvshow.text_color = "0xFFDF7401" @@ -128,10 +128,10 @@ def list_tvshows(item): if "downloads" in item_tvshow.library_urls: num_canales -= 1 if num_canales > 1: - texto_eliminar = "Eliminar serie/canal" + texto_eliminar = config.get_localized_string(60024) multicanal = True else: - texto_eliminar = "Eliminar esta serie" + texto_eliminar = config.get_localized_string(60025) multicanal = False item_tvshow.context = [{"title": texto_visto, @@ -160,7 +160,7 @@ def list_tvshows(item): itemlist = sorted(itemlist, key=lambda it: it.title.lower()) itemlist.append(Item(channel=item.channel, action="update_videolibrary", thumbnail=item.thumbnail, - title="Buscar nuevos episodios y actualizar videoteca", folder=False)) + title=config.get_localized_string(60026), folder=False)) return itemlist @@ -182,7 +182,7 @@ def get_seasons(item): for f in ficheros: if f.endswith('.json'): season = f.split('x')[0] - dict_temp[season] = "Temporada %s" % season + dict_temp[season] = config.get_localized_string(60027) % season if config.get_setting("no_pile_on_seasons", "videolibrary") == 1 and len( dict_temp) == 1: # Sólo si hay una temporada @@ -205,10 +205,10 @@ def get_seasons(item): visto = item_nfo.library_playcounts.get("season %s" % season, 0) new_item.infoLabels["playcount"] = visto if visto > 0: - texto = "Marcar temporada como no vista" + texto = config.get_localized_string(60028) value = 0 else: - texto = "Marcar temporada como vista" + texto = config.get_localized_string(60029) value = 1 new_item.context = [{"title": texto, "action": "mark_season_as_watched", @@ -222,7 +222,7 @@ def get_seasons(item): itemlist = sorted(itemlist, key=lambda it: int(it.contentSeason)) if config.get_setting("show_all_seasons", "videolibrary"): - new_item = item.clone(action="get_episodes", title="*Todas las temporadas") + new_item = item.clone(action="get_episodes", title=config.get_localized_string(60030)) new_item.infoLabels["playcount"] = 0 itemlist.insert(0, new_item) @@ -260,7 +260,7 @@ def get_episodes(item): if epi.contentTitle: title_episodie = epi.contentTitle.strip() else: - title_episodie = "Temporada %s Episodio %s" % \ + title_episodie = config.get_localized_string(60031) % \ (epi.contentSeason, str(epi.contentEpisodeNumber).zfill(2)) epi.contentTitle = "%sx%s" % (epi.contentSeason, str(epi.contentEpisodeNumber).zfill(2)) @@ -273,10 +273,10 @@ def get_episodes(item): visto = item_nfo.library_playcounts.get(season_episode, 0) epi.infoLabels["playcount"] = visto if visto > 0: - texto = "Marcar episodio como no visto" + texto = config.get_localized_string(60032) value = 0 else: - texto = "Marcar episodio como visto" + texto = config.get_localized_string(60033) value = 1 epi.context = [{"title": texto, "action": "mark_content_as_watched", @@ -341,8 +341,8 @@ def findvideos(item): filtro_canal = '' if num_canales > 1 and config.get_setting("ask_channel", "videolibrary"): - opciones = ["Mostrar solo los enlaces de %s" % k.capitalize() for k in list_canales.keys()] - opciones.insert(0, "Mostrar todos los enlaces") + opciones = [config.get_localized_string(70089) % k.capitalize() for k in list_canales.keys()] + opciones.insert(0, config.get_localized_string(70083)) if item_local: opciones.append(item_local.title) @@ -356,7 +356,7 @@ def findvideos(item): platformtools.play_video(item_local) elif index > 0: - filtro_canal = opciones[index].replace("Mostrar solo los enlaces de ", "") + filtro_canal = opciones[index].replace(config.get_localized_string(70078), "") itemlist = [] for nom_canal, json_path in list_canales.items(): @@ -450,7 +450,7 @@ def play(item): v.title = item.contentTitle else: if item.contentType == "episode": - v.title = "Episodio %s" % item.contentEpisodeNumber + v.title = config.get_localized_string(60036) % item.contentEpisodeNumber v.thumbnail = item.thumbnail v.contentThumbnail = item.thumbnail @@ -482,8 +482,8 @@ def update_tvshow(item): logger.info() # logger.debug("item:\n" + item.tostring('\n')) - heading = 'Actualizando serie....' - p_dialog = platformtools.dialog_progress_bg('alfa', heading) + heading = config.get_localized_string(60037) + p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), heading) p_dialog.update(0, heading, item.contentSerieName) import videolibrary_service @@ -619,13 +619,13 @@ def delete(item): # logger.debug(item.tostring('\n')) if item.contentType == 'movie': - heading = "Eliminar película" + heading = config.get_localized_string(70084) else: - heading = "Eliminar serie" + heading = config.get_localized_string(70085) if item.multicanal: # Obtener listado de canales - opciones = ["Eliminar solo los enlaces de %s" % k.capitalize() for k in item.library_urls.keys() if + opciones = [config.get_localized_string(70086) % k.capitalize() for k in item.library_urls.keys() if k != "downloads"] opciones.insert(0, heading) @@ -637,7 +637,7 @@ def delete(item): elif index > 0: # Seleccionado Eliminar canal X - canal = opciones[index].replace("Eliminar solo los enlaces de ", "").lower() + canal = opciones[index].replace(config.get_localized_string(70079), "").lower() num_enlaces = 0 for fd in filetools.listdir(item.path): @@ -651,14 +651,14 @@ def delete(item): del item_nfo.library_urls[canal] filetools.write(item.nfo, head_nfo + item_nfo.tojson()) - msg_txt = "Eliminados %s enlaces del canal %s" % (num_enlaces, canal) + msg_txt = config.get_localized_string(70087) % (num_enlaces, canal) logger.info(msg_txt) platformtools.dialog_notification(heading, msg_txt) platformtools.itemlist_refresh() else: if platformtools.dialog_yesno(heading, - "¿Realmente desea eliminar '%s' de su videoteca?" % item.infoLabels['title']): + config.get_localized_string(70088) % item.infoLabels['title']): delete_all(item)