diff --git a/plugin.video.alfa/channels/downloads.json b/plugin.video.alfa/channels/downloads.json index 1412a6d9..6ee0d432 100755 --- a/plugin.video.alfa/channels/downloads.json +++ b/plugin.video.alfa/channels/downloads.json @@ -128,7 +128,7 @@ "label": "@70238", "lvalues": [ "@70244", - "@70245" + "Reordenar" ], "default": 1, "enabled": true, @@ -145,7 +145,7 @@ "Vose, Eng, Sub, Esp, Lat" ], "default": 0, - "enabled": "eq(-1,@70245])", + "enabled": "eq(-1,'Reordenar')", "visible": true }, { @@ -159,7 +159,7 @@ "SD" ], "default": 0, - "enabled": "eq(-2,@70245])", + "enabled": "eq(-2,'Reordenar')", "visible": true }, { @@ -167,8 +167,8 @@ "type": "bool", "label": "@70242", "default": true, - "enabled": "eq(-3,@70245])", + "enabled": "eq(-3,'Reordenar')", "visible": true } ] -} \ No newline at end of file +} diff --git a/plugin.video.alfa/channels/newpct1.py b/plugin.video.alfa/channels/newpct1.py index 7d8cfdcd..b17651bf 100644 --- a/plugin.video.alfa/channels/newpct1.py +++ b/plugin.video.alfa/channels/newpct1.py @@ -98,7 +98,10 @@ def mainlist(item): def settingCanal(item): from platformcode import platformtools - return platformtools.show_channel_settings() + platformtools.show_channel_settings() + platformtools.itemlist_refresh() + return + def submenu(item): diff --git a/plugin.video.alfa/channels/news.py b/plugin.video.alfa/channels/news.py index f2ec980b..919a5ee5 100644 --- a/plugin.video.alfa/channels/news.py +++ b/plugin.video.alfa/channels/news.py @@ -612,11 +612,11 @@ def setting_channel(item): list_controls.append(control) - caption = "Canales incluidos en Novedades " + item.title.replace("Canales incluidos en: ", "- ").strip() + caption = config.get_localized_string(60533) + item.title.replace(config.get_localized_string(60525), "- ").strip() if config.get_setting("custom_button_value_news", item.channel): - custom_button_label = "Ninguno" + custom_button_label = config.get_localized_string(59992) else: - custom_button_label = "Todos" + custom_button_label = config.get_localized_string(59991) return platformtools.show_channel_settings(list_controls=list_controls, caption=caption, diff --git a/plugin.video.alfa/channels/search.py b/plugin.video.alfa/channels/search.py index 0a262ad8..c2fd5e9c 100644 --- a/plugin.video.alfa/channels/search.py +++ b/plugin.video.alfa/channels/search.py @@ -160,7 +160,7 @@ def searchbycat(item): # Only in xbmc/kodi # Abre un cuadro de dialogo con las categorías en las que hacer la búsqueda - categories = ["Películas", "Series", "Anime", "Documentales", "VOS", "Latino"] + categories = [config.get_localized_string(30122), config.get_localized_string(30123), config.get_localized_string(30124), config.get_localized_string(30125), config.get_localized_string(59975), config.get_localized_string(59976)] categories_id = ["movie", "tvshow", "anime", "documentary", "vos", "latino"] list_controls = [] for i, category in enumerate(categories): @@ -416,7 +416,7 @@ def do_search(item, categories=None): percentage = int(math.ceil(index * t)) list_pendent_names = [a.getName() for a in pendent] - mensaje = "Buscando en %s" % (", ".join(list_pendent_names)) + mensaje = config.get_localized_string(70282) % (", ".join(list_pendent_names)) progreso.update(percentage, config.get_localized_string(60521) % (len(threads) - len(pendent), len(threads)), mensaje) logger.debug(mensaje) diff --git a/plugin.video.alfa/channels/videolibrary.py b/plugin.video.alfa/channels/videolibrary.py index 14764ad3..a18e6784 100644 --- a/plugin.video.alfa/channels/videolibrary.py +++ b/plugin.video.alfa/channels/videolibrary.py @@ -16,10 +16,10 @@ def mainlist(item): itemlist = list() itemlist.append(Item(channel=item.channel, action="list_movies", title=config.get_localized_string(60509), - category="Videoteca de películas", + category=config.get_localized_string(70270), thumbnail=get_thumb("videolibrary_movie.png"))) itemlist.append(Item(channel=item.channel, action="list_tvshows", title=config.get_localized_string(60600), - category="Videoteca de series", + category=config.get_localized_string(70271), thumbnail=get_thumb("videolibrary_tvshow.png"))) return itemlist @@ -146,7 +146,7 @@ def list_tvshows(item): "action": "delete", "channel": "videolibrary", "multicanal": multicanal}, - {"title": "Buscar nuevos episodios ahora", + {"title": config.get_localized_string(70269), "action": "update_tvshow", "channel": "videolibrary"}] # ,{"title": "Cambiar contenido (PENDIENTE)", diff --git a/plugin.video.alfa/core/downloadtools.py b/plugin.video.alfa/core/downloadtools.py index 54b0574b..f3653087 100755 --- a/plugin.video.alfa/core/downloadtools.py +++ b/plugin.video.alfa/core/downloadtools.py @@ -812,7 +812,7 @@ def downloadfileGzipped(url, pathfichero): # Crea el diálogo de progreso from platformcode import platformtools - progreso = platformtools.dialog_progress("addon", "Descargando...", url.split("|")[0], nombrefichero) + progreso = platformtools.dialog_progress("addon", config.get_localized_string(60200), url.split("|")[0], nombrefichero) # Timeout del socket a 60 segundos socket.setdefaulttimeout(10) diff --git a/plugin.video.alfa/core/scraper.py b/plugin.video.alfa/core/scraper.py index 566fa683..ea229982 100755 --- a/plugin.video.alfa/core/scraper.py +++ b/plugin.video.alfa/core/scraper.py @@ -29,7 +29,7 @@ def find_and_set_infoLabels(item): # Obtener el Scraper por defecto de la configuracion segun el tipo de contenido if item.contentType == "movie": scraper_actual = ['tmdb'][config.get_setting("scraper_movies", "videolibrary")] - tipo_contenido = "película" + tipo_contenido = config.get_localized_string(70283) title = item.contentTitle # Completar lista de opciones para este tipo de contenido list_opciones_cuadro.append(scrapers_disponibles['tmdb']) diff --git a/plugin.video.alfa/lib/generictools.py b/plugin.video.alfa/lib/generictools.py index 4f8ca78c..a3b85436 100644 --- a/plugin.video.alfa/lib/generictools.py +++ b/plugin.video.alfa/lib/generictools.py @@ -198,6 +198,9 @@ def post_tmdb_listado(item, itemlist): for item_local in itemlist: #Recorremos el Itenlist generado por el canal title = item_local.title #logger.debug(item_local) + + item_local.last_page = 0 + del item_local.last_page #Borramos restos de paginación if item_local.contentSeason_save: #Restauramos el num. de Temporada item_local.contentSeason = item_local.contentSeason_save @@ -710,9 +713,7 @@ def post_tmdb_findvideos(item, itemlist): title_gen = '%s: %s' % (item.category.capitalize(), title_gen) #Pintamos el pseudo-título con toda la información disponible del vídeo - item.action = "" - item.server = "" - itemlist.append(item.clone(title=title_gen)) #Título con todos los datos del vídeo + itemlist.append(item.clone(action="", server = "", title=title_gen)) #Título con todos los datos del vídeo #agregamos la opción de Añadir a Videoteca para péliculas (no series) if item.contentType == 'movie' and item.contentChannel != "videolibrary": diff --git a/plugin.video.alfa/lib/megaserver/client.py b/plugin.video.alfa/lib/megaserver/client.py index 41adc3e2..5364edd7 100644 --- a/plugin.video.alfa/lib/megaserver/client.py +++ b/plugin.video.alfa/lib/megaserver/client.py @@ -4,6 +4,7 @@ import random import struct import time import urllib +from core import httptools from threading import Thread from file import File @@ -132,9 +133,9 @@ class Client(object): raise Exception("Enlace no valido") def api_req(self, req, get=""): - seqno = random.randint(0, 0xFFFFFFFF) - url = 'https://g.api.mega.co.nz/cs?id=%d%s' % (seqno, get) - return json.loads(self.post(url, json.dumps([req])))[0] + seqno = random.randint(0, 0xFFFFFFFF) + url = 'https://g.api.mega.co.nz/cs?id=%d%s' % (seqno, get) + return json.loads(self.post(url, json.dumps([req])))[0] def base64urldecode(self,data): data += '=='[(2 - len(data) * 3) % 4:] @@ -179,6 +180,7 @@ class Client(object): return sum((self.aes_cbc_decrypt_a32(a[i:i+4], key) for i in xrange(0, len(a), 4)), ()) def post(self, url, data): + return httptools.downloadpage(url, data).data import ssl from functools import wraps def sslwrap(func): diff --git a/plugin.video.alfa/platformcode/download_and_play.py b/plugin.video.alfa/platformcode/download_and_play.py index 3674eb93..750d2451 100755 --- a/plugin.video.alfa/platformcode/download_and_play.py +++ b/plugin.video.alfa/platformcode/download_and_play.py @@ -37,11 +37,11 @@ def download_and_play(url, file_name, download_path): while True: cancelled = False dialog = xbmcgui.DialogProgress() - dialog.create('Descargando...', 'Cierra esta ventana para empezar la reproducción') + dialog.create(config.get_localized_string(60200), config.get_localized_string(60312)) dialog.update(0) while not cancelled and download_thread.isAlive(): - dialog.update(download_thread.get_progress(), "Cancela esta ventana para empezar la reproducción", + dialog.update(download_thread.get_progress(), config.get_localized_string(60313), "Velocidad: " + str(int(download_thread.get_speed() / 1024)) + " KB/s " + str( download_thread.get_actual_size()) + "MB de " + str( download_thread.get_total_size()) + "MB", diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py index eafea016..b928e2db 100644 --- a/plugin.video.alfa/platformcode/platformtools.py +++ b/plugin.video.alfa/platformcode/platformtools.py @@ -1048,6 +1048,21 @@ def play_torrent(item, xlistitem, mediaurl): if seleccion > 1: mediaurl = urllib.quote_plus(item.url) xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")") + + if "quasar" in torrent_options[seleccion][1]: #Seleccionamos que clientes torrent soportamos + if item.strm_path: #Sólo si es de Videoteca + import time + time_limit = time.time() + 150 #Marcamos el timepo máx. de buffering + while not is_playing() and time.time() < time_limit: #Esperamos mientra buffera + time.sleep(5) #Repetimos cada intervalo + logger.debug(str(time_limit)) + + if is_playing(): #Ha terminado de bufferar o ha cancelado + from platformcode import xbmc_videolibrary + xbmc_videolibrary.mark_auto_as_watched(item) #Marcamos como visto al terminar + logger.debug("Llamado el marcado") + else: + logger.debug("Video cancelado o timeout") if seleccion == 1: from platformcode import mct diff --git a/plugin.video.alfa/platformcode/xbmc_info_window.py b/plugin.video.alfa/platformcode/xbmc_info_window.py index b217183a..b7efce30 100755 --- a/plugin.video.alfa/platformcode/xbmc_info_window.py +++ b/plugin.video.alfa/platformcode/xbmc_info_window.py @@ -196,48 +196,48 @@ class InfoWindow(xbmcgui.WindowXMLDialog): # Cargamos los datos para el formato pelicula if self.result.get("mediatype", "movie") == "movie": - self.getControl(10006).setLabel("Título:") + self.getControl(10006).setLabel(config.get_localized_string(60377)) self.getControl(10007).setLabel(self.result.get("title", "N/A")) - self.getControl(10008).setLabel("Título original:") + self.getControl(10008).setLabel(config.get_localized_string(60378)) self.getControl(10009).setLabel(self.result.get("originaltitle", "N/A")) - self.getControl(100010).setLabel("Idioma original:") + self.getControl(100010).setLabel(config.get_localized_string(60379)) self.getControl(100011).setLabel(self.result.get("language", "N/A")) - self.getControl(100012).setLabel("Puntuación:") + self.getControl(100012).setLabel(config.get_localized_string(60380)) self.getControl(100013).setLabel(self.result.get("puntuacion", "N/A")) - self.getControl(100014).setLabel("Lanzamiento:") + self.getControl(100014).setLabel(config.get_localized_string(60381)) self.getControl(100015).setLabel(self.result.get("release_date", "N/A")) - self.getControl(100016).setLabel("Géneros:") + self.getControl(100016).setLabel(config.get_localized_string(60382)) self.getControl(100017).setLabel(self.result.get("genre", "N/A")) # Cargamos los datos para el formato serie else: - self.getControl(10006).setLabel("Serie:") + self.getControl(10006).setLabel(config.get_localized_string(60383)) self.getControl(10007).setLabel(self.result.get("title", "N/A")) - self.getControl(10008).setLabel("Idioma original:") + self.getControl(10008).setLabel(config.get_localized_string(60379)) self.getControl(10009).setLabel(self.result.get("language", "N/A")) - self.getControl(100010).setLabel("Puntuación:") + self.getControl(100010).setLabel(config.get_localized_string(60380)) self.getControl(100011).setLabel(self.result.get("puntuacion", "N/A")) - self.getControl(100012).setLabel("Géneros:") + self.getControl(100012).setLabel(config.get_localized_string(60382) self.getControl(100013).setLabel(self.result.get("genre", "N/A")) if self.result.get("season"): - self.getControl(100014).setLabel("Título temporada:") + self.getControl(100014).setLabel(config.get_localized_string(60384)) self.getControl(100015).setLabel(self.result.get("temporada_nombre", "N/A")) - self.getControl(100016).setLabel("Temporada:") + self.getControl(100016).setLabel(config.get_localized_string(60385)) self.getControl(100017).setLabel(self.result.get("season", "N/A") + " de " + self.result.get("seasons", "N/A")) if self.result.get("episode"): - self.getControl(100014).setLabel("Título:") + self.getControl(100014).setLabel(config.get_localized_string(60377)) self.getControl(100015).setLabel(self.result.get("episode_title", "N/A")) - self.getControl(100018).setLabel("Episodio:") + self.getControl(100018).setLabel(config.get_localized_string(60386)) self.getControl(100019).setLabel(self.result.get("episode", "N/A") + " de " + self.result.get("episodes", "N/A")) - self.getControl(100020).setLabel("Emisión:") + self.getControl(100020).setLabel(config.get_localized_string(60387)) self.getControl(100021).setLabel(self.result.get("date", "N/A")) # Sinopsis if self.result['plot']: - self.getControl(100022).setLabel("Sinopsis:") + self.getControl(100022).setLabel(config.get_localized_string(60388)) self.getControl(100023).setText(self.result.get("plot", "N/A")) else: self.getControl(100022).setLabel("") diff --git a/plugin.video.alfa/resources/language/English/strings.po b/plugin.video.alfa/resources/language/English/strings.po index 96534de7..7af606f8 100644 --- a/plugin.video.alfa/resources/language/English/strings.po +++ b/plugin.video.alfa/resources/language/English/strings.po @@ -3725,6 +3725,14 @@ msgctxt "#70254" msgid "Internal Client" msgstr "" +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "" + +msgctxt "#70282" +msgid "Searching in %s" +msgstr "" + msgctxt "#70255" msgid "Internal client - MCT" msgstr "" @@ -3817,3 +3825,18 @@ msgctxt "#70279" msgid "You can try downloading the 'libtorrent' module from Kodi or installing some addon like 'Quasar' or 'Torrenter', \nwhich will appear among the options in the pop-up \nwhen it appears when clicking on a torrent link. 'Torrenter 'It's more complex but also more complete \nand it always works.'" msgstr "" +msgctxt "#70280" +msgid " - Torrent Links don't work." +msgstr "" + +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "" + +msgctxt "#70282" +msgid "Searching in %s" +msgstr "" + +msgctxt "#70283" +msgid "movie" +msgstr "" diff --git a/plugin.video.alfa/resources/language/Italian/strings.po b/plugin.video.alfa/resources/language/Italian/strings.po index 37d173f7..2de05075 100644 --- a/plugin.video.alfa/resources/language/Italian/strings.po +++ b/plugin.video.alfa/resources/language/Italian/strings.po @@ -391,7 +391,7 @@ msgstr "Alfa Auto-configurazione" msgctxt "#59972" msgid "Search for: '%s' | Found: %d vídeos | Time: %2.f seconds" -msgstr "Ricerca di: '%s' | Trovati: %d vídeos | Tempo: %2.f secondi" +msgstr "Ricerca di: '%s' | Trovati: %d video | Tempo: %2.f secondi" msgctxt "#59973" msgid "Search Cancelled" @@ -971,7 +971,7 @@ msgstr "Nessuna informazione trovata per: %s" msgctxt "#60229" msgid "Enter the name of %s to search" -msgstr "Inserisci il nome di %s per cercare" +msgstr "Inserisci il titolo del %s per cercare" msgctxt "#60230" msgid "Title:" @@ -1687,7 +1687,7 @@ msgstr "Altre opzioni" msgctxt "#60421" msgid "Channels included in the global search " -msgstr "Canali inclusi nella ricerca globale " +msgstr "Canali inclusi nella ricerca globale: " msgctxt "#60422" msgid "Search " @@ -3809,5 +3809,14 @@ msgctxt "#70280" msgid " - Torrent Links don't work." msgstr " - I Link Torrent non funzionano." +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "Vuoi vedere questi links" +msgctxt "#70282" +msgid "Searching in %s" +msgstr "Ricerca in %s" +msgctxt "#70283" +msgid "movie" +msgstr "film" diff --git a/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po b/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po index 40ef40ca..7040cced 100644 --- a/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po +++ b/plugin.video.alfa/resources/language/Spanish (Argentina)/strings.po @@ -3793,4 +3793,15 @@ msgctxt "#70280" msgid " - Torrent Links don't work." msgstr " - Los enlaces Torrent no funcionan." +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "¿Desea mostrar estos enlaces?" + +msgctxt "#70282" +msgid "Searching in %s" +msgstr "Buscando en %s" + +msgctxt "#70283" +msgid "movie" +msgstr "pelicula" diff --git a/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po b/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po index 40ef40ca..63155fd8 100644 --- a/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po +++ b/plugin.video.alfa/resources/language/Spanish (Mexico)/strings.po @@ -3793,4 +3793,14 @@ msgctxt "#70280" msgid " - Torrent Links don't work." msgstr " - Los enlaces Torrent no funcionan." +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "¿Desea mostrar estos enlaces?" +msgctxt "#70282" +msgid "Searching in %s" +msgstr "Buscando en %s" + +msgctxt "#70283" +msgid "movie" +msgstr "pelicula" diff --git a/plugin.video.alfa/resources/language/Spanish/strings.po b/plugin.video.alfa/resources/language/Spanish/strings.po index 40ef40ca..f551c017 100644 --- a/plugin.video.alfa/resources/language/Spanish/strings.po +++ b/plugin.video.alfa/resources/language/Spanish/strings.po @@ -3793,4 +3793,10 @@ msgctxt "#70280" msgid " - Torrent Links don't work." msgstr " - Los enlaces Torrent no funcionan." +msgctxt "#70281" +msgid "Do you want to show these links?" +msgstr "¿Desea mostrar estos enlaces?" +msgctxt "#70282" +msgid "Searching in %s" +msgstr "Buscando en %s" diff --git a/plugin.video.alfa/resources/skins/Default/720p/InfoWindow.xml b/plugin.video.alfa/resources/skins/Default/720p/InfoWindow.xml index 53b68f58..96fcb83f 100755 --- a/plugin.video.alfa/resources/skins/Default/720p/InfoWindow.xml +++ b/plugin.video.alfa/resources/skins/Default/720p/InfoWindow.xml @@ -27,7 +27,7 @@ black center center - + 735 @@ -303,7 +303,7 @@ Controls/KeyboardKeyNF.png center center - + 0 @@ -315,7 +315,7 @@ Controls/KeyboardKeyNF.png center center - + 0 @@ -327,7 +327,7 @@ Controls/KeyboardKeyNF.png center center - + 0 @@ -339,7 +339,7 @@ Controls/KeyboardKeyNF.png center center - + 0 @@ -356,4 +356,4 @@ - \ No newline at end of file + diff --git a/plugin.video.alfa/servers/powvideo.py b/plugin.video.alfa/servers/powvideo.py index 79991591..2696c972 100755 --- a/plugin.video.alfa/servers/powvideo.py +++ b/plugin.video.alfa/servers/powvideo.py @@ -27,11 +27,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= referer = page_url.replace('iframe', 'preview') data = httptools.downloadpage(page_url, headers={'referer': referer}).data - if data == "File was deleted": - return "El archivo no existe o ha sido borrado" - - if 'Video is processing now' in data: - return "El vídeo está siendo procesado, intentalo de nuevo mas tarde" packed = scrapertools.find_single_match(data, "") unpacked = jsunpack.unpack(packed)