From d120d50f7db2d75e60bc79c859551adc63b55550 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Thu, 26 Jul 2018 21:52:11 +0200 Subject: [PATCH 1/4] Cambios internos --- plugin.video.alfa/channels/alltorrent.py | 5 +- plugin.video.alfa/channels/mejortorrent.json | 128 +++++++++---------- 2 files changed, 68 insertions(+), 65 deletions(-) diff --git a/plugin.video.alfa/channels/alltorrent.py b/plugin.video.alfa/channels/alltorrent.py index 505f5059..4d8d78f8 100755 --- a/plugin.video.alfa/channels/alltorrent.py +++ b/plugin.video.alfa/channels/alltorrent.py @@ -61,10 +61,12 @@ def listado(item): except: pass - if not data: #Si la web está caída salimos sin dar error + if not data and item.extra != "año": #Si la web está caída salimos sin dar error logger.error("ERROR 01: LISTADO: La Web no responde o ha cambiado de URL: " + item.url + " / DATA: " + data) itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: LISTADO:. La Web no responde o ha cambiado de URL. Si la Web está activa, reportar el error con el log')) return itemlist #si no hay más datos, algo no funciona, pintamos lo que tenemos + elif not data and item.extra == "año": #cuando no hay datos para un año, da error. Tratamos de evitar el error + return itemlist patron = '
([^"]+)<\/a>\s?<\/div>
(.*?)<\/div><\/div><\/div>' #data = scrapertools.find_single_match(data, patron) @@ -283,6 +285,7 @@ def newest(categoria): if categoria == 'torrent': item.url = host item.extra = "peliculas" + item.channel = "alltorrents" itemlist = listado(item) if itemlist[-1].title == "Página siguiente >>": diff --git a/plugin.video.alfa/channels/mejortorrent.json b/plugin.video.alfa/channels/mejortorrent.json index 7cc93f83..aab7f041 100755 --- a/plugin.video.alfa/channels/mejortorrent.json +++ b/plugin.video.alfa/channels/mejortorrent.json @@ -1,65 +1,65 @@ -{ - "id": "mejortorrent", - "name": "Mejor Torrent", - "active": true, - "adult": false, - "language": ["*"], - "thumbnail": "thumb_intervenido_pn.jpeg", - "banner": "mejortorrent.png", - "categories": [ - "torrent", - "movie", - "tvshow", - "documentary" - ], - "settings": [ - { - "default": "http://www.mejortorrent.com/", - "enabled": true, - "id": "domain_name", - "label": "URL actual de la Web Mejor Torrent", - "type": "text", - "visible": true - }, - { - "default": true, - "enabled": true, - "id": "include_in_global_search", - "label": "Incluir en busqueda global", - "type": "bool", - "visible": true - }, - { - "default": true, - "enabled": true, - "id": "modo_grafico", - "label": "Buscar información extra (TMDB)", - "type": "bool", - "visible": true - }, - { - "default": true, - "enabled": true, - "id": "seleccionar_ult_temporadda_activa", - "label": "Seleccionar para Videoteca si estará activa solo la última Temporada", - "type": "bool", - "visible": true - }, - { - "default": true, - "enabled": true, - "id": "include_in_newest_peliculas", - "label": "Incluir en Novedades - Peliculas", - "type": "bool", - "visible": true - }, - { - "default": true, - "enabled": true, - "id": "include_in_newest_documentales", - "label": "Incluir en Novedades - Documentales", - "type": "bool", - "visible": true - } - ] +{ + "id": "mejortorrent", + "name": "Mejor Torrent", + "active": true, + "adult": false, + "language": ["*"], + "thumbnail": "mejortorrent.png", + "banner": "mejortorrent.png", + "categories": [ + "torrent", + "movie", + "tvshow", + "documentary" + ], + "settings": [ + { + "id": "domain_name", + "type": "text", + "label": "URL actual de la Web Mejor Torrent", + "default": "http://www.mejortorrent.com/", + "enabled": true, + "visible": true + }, + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "modo_grafico", + "type": "bool", + "label": "Buscar información extra (TMDB)", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "seleccionar_ult_temporadda_activa", + "type": "bool", + "label": "Seleccionar para Videoteca si estará activa solo la última Temporada", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "Incluir en Novedades - Peliculas", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_documentales", + "type": "bool", + "label": "Incluir en Novedades - Documentales", + "default": true, + "enabled": true, + "visible": true + } + ] } \ No newline at end of file From bcdebda846ab622600867115472bc65d0d5c4408 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Thu, 26 Jul 2018 21:58:19 +0200 Subject: [PATCH 2/4] Cambios internos --- plugin.video.alfa/channels/alltorrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.video.alfa/channels/alltorrent.py b/plugin.video.alfa/channels/alltorrent.py index 4d8d78f8..89015faf 100755 --- a/plugin.video.alfa/channels/alltorrent.py +++ b/plugin.video.alfa/channels/alltorrent.py @@ -224,6 +224,8 @@ def findvideos(item): #Ahora tratamos el servidor directo item_local = item.clone() servidor = 'openload' + if item.infoLabels['duration']: + item_local.quality = scrapertools.find_single_match(item.quality, '(\s\[.*?\])') #Copiamos la duración enlace = scrapertools.find_single_match(data, 'button-green-download-big".*?href="([^"]+)">') if enlace: try: From 326281b7c5080d5ecf265b7e7a0b865cfacf2a27 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Thu, 26 Jul 2018 22:00:46 +0200 Subject: [PATCH 3/4] Mejoras internas --- plugin.video.alfa/channels/alltorrent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/alltorrent.py b/plugin.video.alfa/channels/alltorrent.py index 89015faf..d982c347 100755 --- a/plugin.video.alfa/channels/alltorrent.py +++ b/plugin.video.alfa/channels/alltorrent.py @@ -224,6 +224,7 @@ def findvideos(item): #Ahora tratamos el servidor directo item_local = item.clone() servidor = 'openload' + item_local.quality = '' if item.infoLabels['duration']: item_local.quality = scrapertools.find_single_match(item.quality, '(\s\[.*?\])') #Copiamos la duración enlace = scrapertools.find_single_match(data, 'button-green-download-big".*?href="([^"]+)">') From 5b399a5ec7dc6b14d8c693ef7adfd133812a3fd8 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Fri, 27 Jul 2018 21:33:36 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Quasar:=20mejora=20de=20t=C3=ADtulos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se pasan los parámetros necesarios para que Quasar, a través de TMDB, obtenga el título del episodio o película. Si no hay tmdb_id, no pasa parámetros adicionales --- plugin.video.alfa/platformcode/platformtools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py index 54459dba..c9502acb 100644 --- a/plugin.video.alfa/platformcode/platformtools.py +++ b/plugin.video.alfa/platformcode/platformtools.py @@ -1039,6 +1039,11 @@ def play_torrent(item, xlistitem, mediaurl): # Plugins externos if seleccion > 1: mediaurl = urllib.quote_plus(item.url) + if "quasar" in torrent_options[seleccion][1] and item.infoLabels['tmdb_id']: #Llamada con más parámetros para completar el título + if item.contentType == 'episode': + mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], item.infoLabels['tmdb_id']) + else: + mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id']) xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")") if "quasar" in torrent_options[seleccion][1]: #Seleccionamos que clientes torrent soportamos