Add files via upload
This commit is contained in:
@@ -113,13 +113,13 @@ def open_settings():
|
||||
if settings_post['adult_aux_new_password1'] == settings_post['adult_aux_new_password2']:
|
||||
set_setting('adult_password', settings_post['adult_aux_new_password1'])
|
||||
else:
|
||||
platformtools.dialog_ok("Canales para adultos",
|
||||
"Los campos 'Nueva contraseña' y 'Confirmar nueva contraseña' no coinciden."
|
||||
, "Entre de nuevo en 'Preferencias' para cambiar la contraseña")
|
||||
platformtools.dialog_ok(config.get_localized_string(60305),
|
||||
config.get_localized_string(60306),
|
||||
config.get_localized_string(60307))
|
||||
|
||||
else:
|
||||
platformtools.dialog_ok("Canales para adultos", "La contraseña no es correcta.",
|
||||
"Los cambios realizados en esta sección no se guardaran.")
|
||||
platformtools.dialog_ok(config.get_localized_string(60305), config.get_localized_string(60309),
|
||||
config.get_localized_string(60310))
|
||||
|
||||
# Deshacer cambios
|
||||
set_setting("adult_mode", settings_pre.get("adult_mode", 0))
|
||||
|
||||
@@ -101,7 +101,7 @@ def run(item=None):
|
||||
elif item.action == "script":
|
||||
from core import tmdb
|
||||
if tmdb.drop_bd():
|
||||
platformtools.dialog_notification("Alfa", "caché eliminada", time=2000, sound=False)
|
||||
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60011), time=2000, sound=False)
|
||||
|
||||
# Action in certain channel specified in "action" and "channel" parameters
|
||||
else:
|
||||
@@ -113,7 +113,7 @@ def run(item=None):
|
||||
# Parental control
|
||||
# If it is an adult channel, and user has configured pin, asks for it
|
||||
if channeltools.is_adult(item.channel) and config.get_setting("adult_request_password"):
|
||||
tecleado = platformtools.dialog_input("", "Contraseña para canales de adultos", True)
|
||||
tecleado = platformtools.dialog_input("", config.get_localized_string(60334), True)
|
||||
if tecleado is None or tecleado != config.get_setting("adult_password"):
|
||||
return
|
||||
|
||||
@@ -168,7 +168,7 @@ def run(item=None):
|
||||
|
||||
# If not, shows user an error message
|
||||
else:
|
||||
platformtools.dialog_ok("alfa", "No hay nada para reproducir")
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(60339))
|
||||
|
||||
# If player don't have a "play" function, not uses the standard play from platformtools
|
||||
else:
|
||||
@@ -280,10 +280,8 @@ def run(item=None):
|
||||
canal = scrapertools.find_single_match(traceback.format_exc(), patron)
|
||||
|
||||
platformtools.dialog_ok(
|
||||
"Error en el canal " + canal,
|
||||
"La web de la que depende parece no estar disponible, puede volver a intentarlo, "
|
||||
"si el problema persiste verifique mediante un navegador la web: %s. "
|
||||
"Si la web funciona correctamente informe el error en: www.alfa-addon.com" %(e))
|
||||
config.get_localized_string(70093) + canal,
|
||||
config.get_localized_string(60013) %(e))
|
||||
except:
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
@@ -298,20 +296,17 @@ def run(item=None):
|
||||
log_name = "xbmc.log"
|
||||
else:
|
||||
log_name = "kodi.log"
|
||||
log_message = "Ruta: " + xbmc.translatePath("special://logpath") + log_name
|
||||
log_message = config.get_localized_string(50004) + xbmc.translatePath("special://logpath") + log_name
|
||||
except:
|
||||
log_message = ""
|
||||
|
||||
if canal:
|
||||
platformtools.dialog_ok(
|
||||
"Error inesperado en el canal " + canal,
|
||||
"Puede deberse a un fallo de conexión, la web del canal "
|
||||
"ha cambiado su estructura, o un error interno de alfa.",
|
||||
"Para saber más detalles, consulta el log.", log_message)
|
||||
config.get_localized_string(70093) + canal,
|
||||
config.get_localized_string(60014), log_message)
|
||||
else:
|
||||
platformtools.dialog_ok(
|
||||
"Se ha producido un error en alfa",
|
||||
"Comprueba el log para ver mas detalles del error.",
|
||||
config.get_localized_string(59984),
|
||||
log_message)
|
||||
|
||||
|
||||
@@ -327,8 +322,8 @@ def reorder_itemlist(itemlist):
|
||||
modified = 0
|
||||
not_modified = 0
|
||||
|
||||
to_change = [['Ver en', '[V]'],
|
||||
['Descargar en', '[D]']]
|
||||
to_change = [[config.get_localized_string(60335), '[V]'],
|
||||
[config.get_localized_string(60336), '[D]']]
|
||||
|
||||
for item in itemlist:
|
||||
old_title = unicode(item.title, "utf8").lower().encode("utf8")
|
||||
@@ -415,7 +410,7 @@ def play_from_library(item):
|
||||
else:
|
||||
# Ventana emergente
|
||||
from channels import videolibrary
|
||||
p_dialog = platformtools.dialog_progress_bg('alfa', 'Cargando...')
|
||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(70004))
|
||||
p_dialog.update(0, '')
|
||||
|
||||
itemlist = videolibrary.findvideos(item)
|
||||
|
||||
@@ -118,7 +118,7 @@ def render_items(itemlist, parent_item):
|
||||
|
||||
# Si no hay ningun item, mostramos un aviso
|
||||
if not len(itemlist):
|
||||
itemlist.append(Item(title="No hay elementos que mostrar"))
|
||||
itemlist.append(Item(title=config.get_localized_string(60347)))
|
||||
|
||||
genre = False
|
||||
if 'nero' in parent_item.title:
|
||||
@@ -437,7 +437,7 @@ def set_context_commands(item, parent_item):
|
||||
if item.action and item.action not in ["add_pelicula_to_library", "add_serie_to_library", "buscartrailer"]:
|
||||
# Mostrar informacion: si el item tiene plot suponemos q es una serie, temporada, capitulo o pelicula
|
||||
if item.infoLabels['plot'] and (num_version_xbmc < 17.0 or item.contentType == 'season'):
|
||||
context_commands.append(("Información", "XBMC.Action(Info)"))
|
||||
context_commands.append((config.get_localized_string(60348), "XBMC.Action(Info)"))
|
||||
|
||||
# ExtendedInfo: Si esta instalado el addon y se cumplen una serie de condiciones
|
||||
if xbmc.getCondVisibility('System.HasAddon(script.extendedinfo)') \
|
||||
@@ -482,7 +482,7 @@ def set_context_commands(item, parent_item):
|
||||
# Ir al Menu Principal (channel.mainlist)
|
||||
if parent_item.channel not in ["news", "channelselector"] and item.action != "mainlist" \
|
||||
and parent_item.action != "mainlist":
|
||||
context_commands.append(("Ir al Menu Principal", "XBMC.Container.Refresh (%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60349), "XBMC.Container.Refresh (%s?%s)" %
|
||||
(sys.argv[0], Item(channel=item.channel, action="mainlist").tourl())))
|
||||
|
||||
# Añadir a Favoritos
|
||||
@@ -524,7 +524,7 @@ def set_context_commands(item, parent_item):
|
||||
# Definir como Pagina de inicio
|
||||
if config.get_setting('start_page'):
|
||||
if item.action not in ['findvideos', 'play']:
|
||||
context_commands.insert(0, ("[COLOR 0xffccff00]Definir como pagina de inicio[/COLOR]",
|
||||
context_commands.insert(0, (config.get_localized_string(60351),
|
||||
"XBMC.RunPlugin(%s?%s)" % (
|
||||
sys.argv[0], Item(channel='side_menu',
|
||||
action="set_custom_start",
|
||||
@@ -533,19 +533,19 @@ def set_context_commands(item, parent_item):
|
||||
if item.channel != "videolibrary":
|
||||
# Añadir Serie a la videoteca
|
||||
if item.action in ["episodios", "get_episodios"] and item.contentSerieName:
|
||||
context_commands.append(("Añadir Serie a Videoteca", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60352), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(action="add_serie_to_library",
|
||||
from_action=item.action).tourl())))
|
||||
# Añadir Pelicula a videoteca
|
||||
elif item.action in ["detail", "findvideos"] and item.contentType == 'movie' and item.contentTitle:
|
||||
context_commands.append(("Añadir Pelicula a Videoteca", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60353), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(action="add_pelicula_to_library",
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
if item.channel != "downloads":
|
||||
# Descargar pelicula
|
||||
if item.contentType == "movie" and item.contentTitle:
|
||||
context_commands.append(("Descargar Pelicula", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60354), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel, from_action=item.action)
|
||||
.tourl())))
|
||||
@@ -553,45 +553,45 @@ def set_context_commands(item, parent_item):
|
||||
elif item.contentSerieName:
|
||||
# Descargar serie
|
||||
if item.contentType == "tvshow":
|
||||
context_commands.append(("Descargar Serie", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
# Descargar episodio
|
||||
elif item.contentType == "episode":
|
||||
context_commands.append(("Descargar Episodio", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
# Descargar temporada
|
||||
elif item.contentType == "season":
|
||||
context_commands.append(("Descargar Temporada", "XBMC.RunPlugin(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||
from_channel=item.channel,
|
||||
from_action=item.action).tourl())))
|
||||
|
||||
# Abrir configuración
|
||||
if parent_item.channel not in ["setting", "news", "search"]:
|
||||
context_commands.append(("Abrir Configuración", "XBMC.Container.Update(%s?%s)" %
|
||||
context_commands.append((config.get_localized_string(60358), "XBMC.Container.Update(%s?%s)" %
|
||||
(sys.argv[0], Item(channel="setting", action="mainlist").tourl())))
|
||||
|
||||
# Buscar Trailer
|
||||
if item.action == "findvideos" or "buscar_trailer" in context:
|
||||
context_commands.append(("Buscar Trailer", "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(
|
||||
context_commands.append((config.get_localized_string(60359), "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(
|
||||
channel="trailertools", action="buscartrailer", contextual=True).tourl())))
|
||||
|
||||
# Añadir SuperFavourites al menu contextual (1.0.53 o superior necesario)
|
||||
sf_file_path = xbmc.translatePath("special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py")
|
||||
check_sf = os.path.exists(sf_file_path)
|
||||
if check_sf and xbmc.getCondVisibility('System.HasAddon("plugin.program.super.favourites")'):
|
||||
context_commands.append(("Super Favourites Menu",
|
||||
context_commands.append((config.get_localized_string(60361),
|
||||
"XBMC.RunScript(special://home/addons/plugin.program.super.favourites/LaunchSFMenu.py)"))
|
||||
|
||||
context_commands = sorted(context_commands, key=lambda comand: comand[0])
|
||||
# Menu Rapido
|
||||
context_commands.insert(0, ("[COLOR 0xffccff00]<Menú Rápido>[/COLOR]",
|
||||
context_commands.insert(0, (config.get_localized_string(60360),
|
||||
"XBMC.Container.Update (%s?%s)" % (sys.argv[0], Item(channel='side_menu',
|
||||
action="open_menu",
|
||||
parent=parent_item.tourl()).tourl(
|
||||
@@ -755,7 +755,7 @@ def handle_wait(time_to_wait, title, text):
|
||||
secs += 1
|
||||
percent = increment * secs
|
||||
secs_left = str((time_to_wait - secs))
|
||||
remaining_display = ' Espera ' + secs_left + ' segundos para que comience el vídeo...'
|
||||
remaining_display = config.get_localized_string(70176) + secs_left + config.get_localized_string(70177)
|
||||
espera.update(percent, ' ' + text, remaining_display)
|
||||
xbmc.sleep(1000)
|
||||
if espera.iscanceled():
|
||||
@@ -835,13 +835,13 @@ def get_dialogo_opciones(item, default_action, strm, autoplay):
|
||||
if not autoplay:
|
||||
if item.server != "":
|
||||
if "<br/>" in motivo:
|
||||
dialog_ok("No puedes ver ese vídeo porque...", motivo.split("<br/>")[0], motivo.split("<br/>")[1],
|
||||
dialog_ok(config.get_localized_string(60362), motivo.split("<br/>")[0], motivo.split("<br/>")[1],
|
||||
item.url)
|
||||
else:
|
||||
dialog_ok("No puedes ver ese vídeo porque...", motivo, item.url)
|
||||
dialog_ok(config.get_localized_string(60362), motivo, item.url)
|
||||
else:
|
||||
dialog_ok("No puedes ver ese vídeo porque...", "El servidor donde está alojado no está",
|
||||
"soportado en alfa todavía", item.url)
|
||||
dialog_ok(config.get_localized_string(60362), config.get_localized_string(60363),
|
||||
config.get_localized_string(60364), item.url)
|
||||
|
||||
if item.channel == "favorites":
|
||||
# "Quitar de favoritos"
|
||||
@@ -935,7 +935,7 @@ def get_video_seleccionado(item, seleccion, video_urls):
|
||||
|
||||
# Si hay un tiempo de espera (como en megaupload), lo impone ahora
|
||||
if wait_time > 0:
|
||||
continuar = handle_wait(wait_time, item.server, "Cargando vídeo...")
|
||||
continuar = handle_wait(wait_time, item.server, config.get_localized_string(60365))
|
||||
if not continuar:
|
||||
mediaurl = ""
|
||||
|
||||
@@ -1016,9 +1016,9 @@ def torrent_client_installed(show_tuple=False):
|
||||
for client in torrent_clients:
|
||||
if xbmc.getCondVisibility('System.HasAddon("%s")' % client["id"]):
|
||||
if show_tuple:
|
||||
torrent_options.append(["Plugin externo: %s" % client["name"], client["url"]])
|
||||
torrent_options.append([config.get_localized_string(60366) % client["name"], client["url"]])
|
||||
else:
|
||||
torrent_options.append("Plugin externo: %s" % client["name"])
|
||||
torrent_options.append(config.get_localized_string(60366) % client["name"])
|
||||
return torrent_options
|
||||
|
||||
|
||||
@@ -1035,12 +1035,12 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
if torrent_client and torrent_client - 1 <= len(torrent_options):
|
||||
if torrent_client == 0:
|
||||
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
seleccion = torrent_client - 1
|
||||
else:
|
||||
if len(torrent_options) > 1:
|
||||
seleccion = dialog_select("Abrir torrent con...", [opcion[0] for opcion in torrent_options])
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
seleccion = 0
|
||||
|
||||
@@ -1068,10 +1068,10 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
# Iniciamos el cliente:
|
||||
c = Client(url=mediaurl, is_playing_fnc=xbmc_player.isPlaying, wait_time=None, timeout=10,
|
||||
temp_path=os.path.join(client_tmp_path, "alfa-torrent"), print_status=debug)
|
||||
temp_path=os.path.join(client_tmp_path, config.get_localized_string(70194)), print_status=debug)
|
||||
|
||||
# Mostramos el progreso
|
||||
progreso = dialog_progress("Alfa - Torrent", "Iniciando...")
|
||||
progreso = dialog_progress(config.get_localized_string(70195), config.get_localized_string(70196))
|
||||
|
||||
# Mientras el progreso no sea cancelado ni el cliente cerrado
|
||||
while not c.closed:
|
||||
@@ -1092,7 +1092,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
(s.progress_file, s.file_size, s.str_state, s._download_rate)
|
||||
txt2 = 'S: %d(%d) P: %d(%d)' % (s.num_seeds, s.num_complete, s.num_peers, s.num_incomplete)
|
||||
try:
|
||||
txt3 = 'Deteniendo automaticamente en: %ss' % (int(s.timeout))
|
||||
txt3 = config.get_localized_string(70197) % (int(s.timeout))
|
||||
except:
|
||||
txt3 = ''
|
||||
|
||||
@@ -1102,21 +1102,21 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
if progreso.iscanceled():
|
||||
progreso.close()
|
||||
if s.buffer == 100:
|
||||
if dialog_yesno("Alfa - Torrent", "¿Deseas iniciar la reproduccion?"):
|
||||
if dialog_yesno(config.get_localized_string(70195), config.get_localized_string(70198)):
|
||||
played = False
|
||||
progreso = dialog_progress("Alfa - Torrent", "")
|
||||
progreso = dialog_progress(config.get_localized_string(70195), "")
|
||||
progreso.update(s.buffer, txt, txt2, txt3)
|
||||
else:
|
||||
progreso = dialog_progress("Alfa - Torrent", "")
|
||||
progreso = dialog_progress(config.get_localized_string(70195), "")
|
||||
break
|
||||
|
||||
else:
|
||||
if dialog_yesno("Alfa - Torrent", "¿Deseas cancelar el proceso?"):
|
||||
progreso = dialog_progress("Alfa - Torrent", "")
|
||||
if dialog_yesno(config.get_localized_string(70195), config.get_localized_string(70199)):
|
||||
progreso = dialog_progress(config.get_localized_string(70195), "")
|
||||
break
|
||||
|
||||
else:
|
||||
progreso = dialog_progress("Alfa - Torrent", "")
|
||||
progreso = dialog_progress(config.get_localized_string(70195), "")
|
||||
progreso.update(s.buffer, txt, txt2, txt3)
|
||||
|
||||
# Si el buffer se ha llenado y la reproduccion no ha sido iniciada, se inicia
|
||||
@@ -1147,7 +1147,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
time.sleep(1)
|
||||
|
||||
# Cuando este cerrado, Volvemos a mostrar el dialogo
|
||||
progreso = dialog_progress("Alfa - Torrent", "")
|
||||
progreso = dialog_progress(config.get_localized_string(70195), "")
|
||||
progreso.update(s.buffer, txt, txt2, txt3)
|
||||
|
||||
except:
|
||||
@@ -1155,7 +1155,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
logger.error(traceback.format_exc())
|
||||
break
|
||||
|
||||
progreso.update(100, "Terminando y eliminando datos", " ", " ")
|
||||
progreso.update(100, config.get_localized_string(70200), " ", " ")
|
||||
|
||||
# Detenemos el cliente
|
||||
if not c.closed:
|
||||
|
||||
@@ -204,6 +204,7 @@ def set_lang(language):
|
||||
#logger.info()
|
||||
|
||||
cast =['castellano','espanol','cast','esp','espaol', 'es','zc', 'spa', 'spanish', 'vc']
|
||||
ita =['italiano','italian','ita','it']
|
||||
lat=['latino','lat','la', 'espanol latino', 'espaol latino', 'zl', 'mx', 'co', 'vl']
|
||||
vose=['subtitulado','subtitulada','sub','sub espanol','vose','espsub','su','subs castellano',
|
||||
'sub: español', 'vs', 'zs', 'vs', 'english-spanish subs', 'ingles sub espanol']
|
||||
@@ -222,6 +223,8 @@ def set_lang(language):
|
||||
language = 'cast'
|
||||
elif language in lat:
|
||||
language = 'lat'
|
||||
elif language in ita:
|
||||
language = 'ita'
|
||||
elif language in vose:
|
||||
language = 'vose'
|
||||
elif language in vos:
|
||||
|
||||
@@ -208,8 +208,8 @@ def sync_trakt_kodi(silent=True):
|
||||
logger.info("Sincronizacion con Trakt iniciada")
|
||||
|
||||
if notificacion:
|
||||
platformtools.dialog_notification("Alfa",
|
||||
"Sincronizacion con Trakt iniciada",
|
||||
platformtools.dialog_notification(config.get_localized_string(20000),
|
||||
config.get_localized_string(60045),
|
||||
icon=0,
|
||||
time=2000)
|
||||
|
||||
@@ -440,17 +440,15 @@ def set_content(content_type, silent=False):
|
||||
videolibrarypath = config.get_setting("videolibrarypath")
|
||||
|
||||
if content_type == 'movie':
|
||||
scraper = ["The Movie Database", "Universal Movie Scraper"]
|
||||
seleccion = platformtools.dialog_select("Seleccione el scraper para las películas", scraper)
|
||||
scraper = [config.get_localized_string(70093), config.get_localized_string(70096)]
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
|
||||
# Instalar The Movie Database
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'):
|
||||
if not silent:
|
||||
# Preguntar si queremos instalar metadata.themoviedb.org
|
||||
install = platformtools.dialog_yesno("The Movie Database",
|
||||
"No se ha encontrado el Scraper de películas de TheMovieDB.",
|
||||
"¿Desea instalarlo ahora?")
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60046))
|
||||
else:
|
||||
install = True
|
||||
|
||||
@@ -464,7 +462,7 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'))
|
||||
if not continuar:
|
||||
msg_text = "The Movie Database no instalado."
|
||||
msg_text = config.get_localized_string(60047)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.themoviedb.org)', True)
|
||||
|
||||
@@ -474,9 +472,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = False
|
||||
if not silent:
|
||||
# Preguntar si queremos instalar metadata.universal
|
||||
install = platformtools.dialog_yesno("Universal Movie Scraper",
|
||||
"No se ha encontrado el Scraper de series de TheMovieDB.",
|
||||
"¿Desea instalarlo ahora?")
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(70095))
|
||||
else:
|
||||
install = True
|
||||
|
||||
@@ -490,22 +486,20 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = "Universal Movie Scraper no instalado."
|
||||
msg_text = config.get_localized_string(70097)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.universal)', True)
|
||||
|
||||
else: # SERIES
|
||||
scraper = ["The TVDB", "The Movie Database"]
|
||||
seleccion = platformtools.dialog_select("Seleccione el scraper para las series", scraper)
|
||||
scraper = [config.get_localized_string(70098), config.get_localized_string(70093)]
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper)
|
||||
|
||||
# Instalar The TVDB
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'):
|
||||
if not silent:
|
||||
# Preguntar si queremos instalar metadata.tvdb.com
|
||||
install = platformtools.dialog_yesno("The TVDB",
|
||||
"No se ha encontrado el Scraper de series de The TVDB.",
|
||||
"¿Desea instalarlo ahora?")
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60048))
|
||||
else:
|
||||
install = True
|
||||
|
||||
@@ -519,7 +513,7 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'))
|
||||
if not continuar:
|
||||
msg_text = "The TVDB no instalado."
|
||||
msg_text = config.get_localized_string(70099)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvdb.com)', True)
|
||||
|
||||
@@ -529,9 +523,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = False
|
||||
if not silent:
|
||||
# Preguntar si queremos instalar metadata.tvshows.themoviedb.org
|
||||
install = platformtools.dialog_yesno("The Movie Database",
|
||||
"No se ha encontrado el Scraper de series de TheMovieDB.",
|
||||
"¿Desea instalarlo ahora?")
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(70100))
|
||||
else:
|
||||
install = True
|
||||
|
||||
@@ -546,7 +538,7 @@ def set_content(content_type, silent=False):
|
||||
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = "The Movie Database no instalado."
|
||||
msg_text = config.get_localized_string(60047)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvshows.themoviedb.org)', True)
|
||||
|
||||
@@ -594,7 +586,7 @@ def set_content(content_type, silent=False):
|
||||
idParentPath = idPath
|
||||
idPath += 1
|
||||
else:
|
||||
msg_text = "Error al fijar videolibrarypath en BD"
|
||||
msg_text = config.get_localized_string(70101)
|
||||
|
||||
if continuar:
|
||||
continuar = False
|
||||
@@ -647,7 +639,7 @@ def set_content(content_type, silent=False):
|
||||
else:
|
||||
if not silent:
|
||||
# Preguntar si queremos configurar themoviedb.org como opcion por defecto
|
||||
actualizar = platformtools.dialog_yesno("The TVDB", strActualizar)
|
||||
actualizar = platformtools.dialog_yesno(config.get_localized_string(70098), strActualizar)
|
||||
else:
|
||||
actualizar = True
|
||||
|
||||
@@ -663,17 +655,17 @@ def set_content(content_type, silent=False):
|
||||
continuar = True
|
||||
|
||||
if not continuar:
|
||||
msg_text = "Error al configurar el scraper en la BD."
|
||||
msg_text = config.get_localized_string(60055)
|
||||
|
||||
if not continuar:
|
||||
heading = "Videoteca %s no configurada" % content_type
|
||||
heading = config.get_localized_string(70102) % content_type
|
||||
elif content_type == 'SERIES' and not xbmc.getCondVisibility(
|
||||
'System.HasAddon(metadata.tvshows.themoviedb.org)'):
|
||||
heading = "Videoteca %s configurada" % content_type
|
||||
msg_text = "Es necesario reiniciar Kodi para que los cambios surtan efecto."
|
||||
heading = config.get_localized_string(70103) % content_type
|
||||
msg_text = config.get_localized_string(60058)
|
||||
else:
|
||||
heading = "Videoteca %s configurada" % content_type
|
||||
msg_text = "Felicidades la videoteca de Kodi ha sido configurada correctamente."
|
||||
heading = config.get_localized_string(70103) % content_type
|
||||
msg_text = config.get_localized_string(70104)
|
||||
platformtools.dialog_notification(heading, msg_text, icon=1, time=3000)
|
||||
|
||||
logger.info("%s: %s" % (heading, msg_text))
|
||||
@@ -824,9 +816,9 @@ def ask_set_content(flag, silent=False):
|
||||
add_sources(config.get_setting("downloadpath"))
|
||||
|
||||
if not silent:
|
||||
heading = "Alfa Auto-configuración"
|
||||
linea1 = "¿Desea que Alfa auto-configure la videoteca de Kodi? Se le pedirá que configure los scrapers para las películas y las series."
|
||||
linea2 = "Si pulsa 'No', podra hacerlo desde 'Configuración > Preferencia > Rutas'."
|
||||
heading = config.get_localized_string(59971)
|
||||
linea1 = config.get_localized_string(70105)
|
||||
linea2 = config.get_localized_string(70106)
|
||||
if platformtools.dialog_yesno(heading, linea1, linea2):
|
||||
do_config()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user