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