diff --git a/mediaserver/COMO INSTALAR.txt b/mediaserver/COMO INSTALAR.txt
new file mode 100644
index 00000000..48d5bd3f
--- /dev/null
+++ b/mediaserver/COMO INSTALAR.txt
@@ -0,0 +1,24 @@
+Esta versión de Alfa no necesita de ningún programa para instalar (tampoco kodi), es una versión independiente que solo necesita un navegador web y un equipo (en el cual será instalado) para ver el contenido desde cualquier dispositivo que cuente con un navegador web.
+
+REQUISITOS:
+
+Se necesita que esté instalado python 2.x desde aqui: https://www.python.org/
+
+COMO INSTALAR LA VERSION MEDIASERVER:
+
+-Descargar Alfa desde el reposotorio de Github: https://github.com/alfa-addon/addon (opcion Clone or download - Download zip
+-El archivo descargado (addon-master.zip) abrirlo e ingresar a la carpeta: addon-master
+-Descomprimir la carpeta plugin.video.alfa en alguna carpeta
+-Luego descomprimir la carpeta mediaserver encima de la carpeta plugi.video.alfa reemplazando los archivos existentes.
+
+COMO INICIAR LA VERSION MEDIASERVER
+
+Para iniciar: python alfa.py
+
+Y mostrará en pantalla la url a la cual se puede conectar desde cualquier dispositivo que contenga un navegador web.
+
+Ejemplo:
+
+http://192.168.1.10:8080
+
+
diff --git a/mediaserver/IMPORTANTE LEEME en esta version.txt b/mediaserver/IMPORTANTE LEEME en esta version.txt
deleted file mode 100644
index 5a9a151e..00000000
--- a/mediaserver/IMPORTANTE LEEME en esta version.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Debe ejecutar primero el archivo "script.py", si no lo hizo antes.
-Una vez realizado el proceso podrá ejecutar como siempre "alfa.py" para iniciar el addon.
\ No newline at end of file
diff --git a/mediaserver/platformcode/config.py b/mediaserver/platformcode/config.py
index cd810bd2..4589f1dd 100644
--- a/mediaserver/platformcode/config.py
+++ b/mediaserver/platformcode/config.py
@@ -310,6 +310,23 @@ def verify_directories_created():
logger.debug("Creating %s: %s" % (path, saved_path))
filetools.mkdir(saved_path)
+ config_paths = [["folder_movies", "CINE"],
+ ["folder_tvshows", "SERIES"]]
+
+ for path, default in config_paths:
+ saved_path = get_setting(path)
+
+ if not saved_path:
+ saved_path = default
+ set_setting(path, saved_path)
+
+ content_path = filetools.join(get_videolibrary_path(), saved_path)
+ if not filetools.exists(content_path):
+ logger.debug("Creating %s: %s" % (path, content_path))
+
+ # si se crea el directorio
+ filetools.mkdir(content_path)
+
def get_local_ip():
import socket
@@ -371,6 +388,7 @@ if not os.path.exists(get_data_path()):
load_settings()
TRANSLATION_FILE_PATH = os.path.join(get_runtime_path(), "resources", "language", settings_dic["mediacenter_language"], "strings.po")
+
# modo adulto:
# sistema actual 0: Nunca, 1:Siempre, 2:Solo hasta que se reinicie sesión
# si es == 2 lo desactivamos.
diff --git a/mediaserver/platformcode/launcher.py b/mediaserver/platformcode/launcher.py
index 9a5f551c..9f223346 100644
--- a/mediaserver/platformcode/launcher.py
+++ b/mediaserver/platformcode/launcher.py
@@ -40,6 +40,7 @@ def run(item):
platformtools.render_items(None, item)
return
+ channelmodule = None
# Importa el canal para el item, todo item debe tener un canal, sino sale de la función
if item.channel:
channelmodule = import_channel(item)
diff --git a/mediaserver/platformcode/template/css/alfa.css b/mediaserver/platformcode/template/css/alfa.css
index 500e1ed8..0cbc53dd 100644
--- a/mediaserver/platformcode/template/css/alfa.css
+++ b/mediaserver/platformcode/template/css/alfa.css
@@ -131,9 +131,12 @@ div.header {
}
div.header > div.logo {
float: left;
- height: 50px;
- width: 70px;
- background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2270px%22%20height%3D%2250px%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Crect%20fill%3D%22%2391D9E8%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%229%22%20y%3D%2215%22%20width%3D%2240.4%22%20height%3D%2226.5%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%226%22%20y%3D%229%22%20width%3D%2210.8%22%20height%3D%229.3%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%2237%22%20y%3D%2235%22%20width%3D%2215.5%22%20height%3D%2212.4%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2300ABE3%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%2233%22%20y%3D%222%22%20width%3D%2234.2%22%20height%3D%2225%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3Crect%20fill%3D%22%2303BFEC%22%20stroke%3D%22%2301455C%22%20stroke-width%3D%221%22%20x%3D%223%22%20y%3D%2227%22%20width%3D%2224.8%22%20height%3D%2217%22%20rx%3D%222%22%20ry%3D%222%22%2F%3E%0A%3C%2Fsvg%3E");
+ height: 45px;
+ width: 60px;
+ margin-left: 15px;
+ margin-top: 2px;
+ background-repeat: no-repeat;
+ background-image: url("https://github.com/alfa-addon/addon/raw/master/mediaserver/platformcode/template/logo-mediaserver.png");
}
div.header > a.settings:after {
@@ -1303,4 +1306,4 @@ ul.itemlist > li.item_list > a.item > h3.label {
padding-top: 0px;
left: 0px;
right: 0px;
-}
\ No newline at end of file
+}
diff --git a/mediaserver/platformcode/template/favicon.ico b/mediaserver/platformcode/template/favicon.ico
index 1cad56c7..639eeb64 100644
Binary files a/mediaserver/platformcode/template/favicon.ico and b/mediaserver/platformcode/template/favicon.ico differ
diff --git a/mediaserver/script.py b/mediaserver/script.py
deleted file mode 100644
index 5936fd82..00000000
--- a/mediaserver/script.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# -*- coding: utf-8 -*-
-import os
-import re
-import shutil
-
-from platformcode import config, logger, platformtools
-
-
-def conversion():
- logger.info()
- data = ""
-
- try:
- # do a backup
- path_settings = os.path.join(config.get_data_path(), "settings.xml")
- path_settings_backup = os.path.join(config.get_data_path(), "settings.backup.xml")
- shutil.copy(path_settings, path_settings_backup)
-
- # open file
- f = open(path_settings, "r")
- # copy = open(path_settings2, "w")
-
- logger.info(" ---")
- logger.info(" --- 1")
- logger.info(" --- 2")
- logger.info(" --- 3")
- data_aux = ""
-
- begin_tag = "\n"
- end_tag = "\n"
-
- adult_data = ' \n'
- adult_data += ' \n'
- adult_data += ' \n'
- adult_data += ' \n'
- adult_data += ' \n'
- adult_data += ' \n'
-
- for line in f:
- matches = re.findall(' tag
- # data += line
- else:
- logger.info("Matches")
- for _id, value in matches:
- logger.info(" dentro del for")
- logger.info(" _id:%s value:%s" % (_id, value))
-
- if _id not in ["adult_aux_intro_password", "adult_aux_new_password1", "adult_aux_new_password2",
- "adult_mode", "adult_password", "adult_request_password", "adult_pin"]:
- logger.info(" linea %s" % line)
- logger.info(" value %s" % value)
- if value:
- # logger.info(" type value!! %s" % type(value))
- logger.info(" antes value!! %s" % value)
- if "(str, " in value:
- if "(str, '" in value:
- value = value.replace("(str, '", "")
- value = value.replace("')", "")
- elif "(str, '":
- value = value.replace("(str, '", "")
- value = value.replace("')", "")
- elif "(bool, " in value:
- value = value.replace("(bool, ", "")
- if value == "True)":
- value = "true"
- else:
- value = "false"
- value = value.replace('\\\\', '\\')
- logger.info(" despues value!! %s" % value)
-
- aux_line = '\n' % (_id, value)
- logger.info(" aux_line %s" % aux_line)
- data_aux += " " + aux_line
- f.close()
-
- data = begin_tag + adult_data + data_aux + end_tag
-
- copy_file = open(path_settings, "w")
- copy_file.write(data)
- copy_file.close()
-
- while True:
- import sys
- logger.info("sys ve %s" % sys.version_info)
- if sys.version_info > (3, 0):
- value = input("Alfa\nCorregido un error en la seccion adultos, se ha reseteado la contrasena a por "
- "defecto, tendra que cambiarla de nuevo si lo desea.\n Escriba 's', si lo ha entendido: ")
- else:
- value = raw_input("Alfa\nCorregido un error en la seccion adultos, se ha reseteado la contrasena a por "
- "defecto, tendra que cambiarla de nuevo si lo desea.\n Escriba 's', si lo ha entendido: ")
- logger.debug("value %s" % value)
- if value.lower() == 's':
- break
- logger.info("En disclaimer clickó 'No'")
-
- logger.info("En disclaimer clickó 'Si'")
-
- except Exception, ex:
- template = "An exception of type %s occured. Arguments:\n%r"
- message = template % (type(ex).__name__, ex.args)
- logger.info(message)
- print("Alfa", "Error, en conversión")
- logger.info("Datos a guardar %s" % data)
-
-if __name__ == "__main__":
- conversion()
diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml
index fe136a21..f9207650 100755
--- a/plugin.video.alfa/addon.xml
+++ b/plugin.video.alfa/addon.xml
@@ -1,5 +1,5 @@
-
+
@@ -22,12 +22,14 @@
» grantorrent » descargas2020
» torrentlocura » torrentrapid
» tumejortorrent » tvsinpagar
- » mispelisyseries » kbagi
- » animemovil » pelismagnet
- » pelisultra » seriesdanko
- » seriespapaya » seriesverde
- » ultrapeliculas » wikiseries
- ¤ arreglos internos
+ » mispelisyseries » playview
+ » clipwatching » cloudvideo
+ » filevideo » upvid
+ » vidzella » vivo
+ » watchvideo » vshare
+ ¤ arreglos internos y actualizado la versión mediaserver
+
+ ¤ Agradecimientos a @alaquepasa y @Pixo506 por colaborar con ésta versión.
Navega con Kodi por páginas web para ver sus videos de manera fácil.
diff --git a/plugin.video.alfa/channels/descargas2020.py b/plugin.video.alfa/channels/descargas2020.py
index 01aed6bb..98e005c6 100644
--- a/plugin.video.alfa/channels/descargas2020.py
+++ b/plugin.video.alfa/channels/descargas2020.py
@@ -5,6 +5,7 @@ import sys
import urllib
import urlparse
import datetime
+import ast
from channelselector import get_thumb
from core import httptools
@@ -17,15 +18,34 @@ from lib import generictools
host = 'http://descargas2020.com/'
+#Código para permitir usar un único canal para todas las webs clones de NewPct1
+clone_list = config.get_setting('clonenewpct1_channels_list', "torrentrapid") #Carga lista de clones
+clone_list = ast.literal_eval(clone_list) #la convierte a lista de tuplas
+host_index = 0
+host_index = config.get_setting('clonenewpct1_channel_default', "torrentrapid") #Clone por defecto
+i = 0
+for active_clone, channel_clone, host_clone, contentType_clone, info_clone in clone_list:
+ if i == host_index:
+ #channel_clone_name = channel_clone #ACTIVAR CUANDO SE PASE A NEWPCT1
+ #host = 'http://%s/' % host_clone #ACTIVAR CUANDO SE PASE A NEWPCT1
+ i += 1
+
+#Carga de opciones del canal
item = Item()
if not item.channel:
item.channel = scrapertools.find_single_match(host, r'(\w+)\.com\/')
+channel_clone_name = scrapertools.find_single_match(host, r'(\w+)\.com\/') #QUITAR CUANDO SE PASE A NEWPCT1
__modo_grafico__ = config.get_setting('modo_grafico', item.channel)
modo_ultima_temp = config.get_setting('seleccionar_ult_temporadda_activa', item.channel)
+
def mainlist(item):
logger.info()
+ #Renombramos el canal al nombre de clone elegido
+ item.channel = channel_clone_name
+ if item.category: item.category = channel_clone_name.capitalize()
+
itemlist = []
thumb_pelis = get_thumb("channels_movie.png")
@@ -64,20 +84,40 @@ def settingCanal(item):
def submenu(item):
logger.info()
itemlist = []
-
+
try:
data = re.sub(r"\n|\r|\t|\s{2}|()", "", httptools.downloadpage(item.url).data)
except:
- logger.error("ERROR 01: SUBMENU: La Web no responde o ha cambiado de URL: " + item.url)
- itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: La Web no responde o ha cambiado de URL. Si la Web está activa, reportar el error con el log'))
- return itemlist #Algo no funciona, pintamos lo que tenemos
- data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
- data = data.replace("'", '"').replace('/series"', '/series/"') #Compatibilidad con mispelisy.series.com
-
+ pass
+
+ host_alt = host
host_dom = host.replace("https://", "").replace("http://", "").replace("www.", "")
patron = '.*?(.*?)'
- if "pelisyseries.com" in host and item.extra == "varios": #compatibilidad con mispelisy.series.com
- data = ' Documentales'
+ #Verificamos si se ha cargado una página, y si además tiene la estructura correcta
+ if not data or not scrapertools.find_single_match(data, patron):
+ logger.error("ERROR 01: SUBMENU: La Web no responde o ha cambiado de URL: " + item.url)
+ #Si no hay datos consistentes, llamamos al método de fail_over para que encuentre un canal que esté activo y pueda gestionar el submenú
+ item, data = generictools.fail_over_newpct1(item, patron)
+
+ if not data: #Si no ha logrado encontrar nada, salimos
+ itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel.capitalize() + '[/COLOR]: Ningún canal NewPct1 activo'))
+ itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: 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 item.channel_alt: #Si ha habido fail-over, lo comento
+ itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel.capitalize() + '[/COLOR] [ALT ] en uso'))
+ itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel_alt.capitalize() + '[/COLOR] caído'))
+
+ host_alt = host.replace(item.channel_alt, item.channel)
+ del item.channel_alt
+ if item.url_alt: del item.url_alt
+
+ #data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
+ #data = data.replace("'", '"').replace('/series"', '/series/"') #Compatibilidad con mispelisy.series.com
+
+ host_dom = host_alt.replace("https://", "").replace("http://", "").replace("www.", "")
+ patron = '.*?(.*?)'
+ if "pelisyseries.com" in host_alt and item.extra == "varios": #compatibilidad con mispelisy.series.com
+ data = ' Documentales'
else:
if data:
data = scrapertools.get_match(data, patron)
@@ -104,10 +144,10 @@ def submenu(item):
Item(channel=item.channel, action="alfabeto", title=title + " [A-Z]", url=url, extra=item.extra))
if item.extra == "peliculas":
- itemlist.append(Item(channel=item.channel, action="listado", title="Películas 4K", url=host + "peliculas-hd/4kultrahd/", extra=item.extra))
+ itemlist.append(Item(channel=item.channel, action="listado", title="Películas 4K", url=host_alt + "peliculas-hd/4kultrahd/", extra=item.extra))
itemlist.append(
- Item(channel=item.channel, action="alfabeto", title="Películas 4K" + " [A-Z]", url=host + "peliculas-hd/4kultrahd/", extra=item.extra))
-
+ Item(channel=item.channel, action="alfabeto", title="Películas 4K" + " [A-Z]", url=host_alt + "peliculas-hd/4kultrahd/", extra=item.extra))
+
return itemlist
@@ -203,7 +243,8 @@ def listado(item):
#logger.debug("patron: " + patron + " / fichas: " + fichas)
# Identifico la página actual y el total de páginas para el pie de página
- total_pag = scrapertools.find_single_match(data,'Last<\/a><\/li>')
+ patron_last_page = 'Last<\/a><\/li>'
+ total_pag = scrapertools.find_single_match(data, patron_last_page)
if not item.post_num:
post_num = 1
@@ -419,6 +460,9 @@ def listado(item):
def listado_busqueda(item):
logger.info()
+
+ host = 'http://%s/' % scrapertools.find_single_match(item.url, '(\w+\.com)\/')
+
itemlist = []
cnt_tot = 40 # Poner el num. máximo de items por página. Dejamos que la web lo controle
cnt_title = 0 # Contador de líneas insertadas en Itemlist
@@ -449,17 +493,24 @@ def listado_busqueda(item):
#Máximo num. de líneas permitidas por TMDB. Máx de 5 páginas por Itemlist para no degradar el rendimiento
while cnt_title <= cnt_tot and cnt_next < 5:
+ pattern = '' % item.pattern #seleccionamos el bloque que nos interesa
try:
data = re.sub(r"\n|\r|\t|\s{2,}", "", httptools.downloadpage(item.url, post=item.post).data)
except:
- logger.error("ERROR 01: LISTADO_BUSQUEDA: 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_BUSQUEDA:. 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
- cnt_next += 1
- if not data: #Si la web está caída salimos sin dar error
- logger.error("ERROR 01: LISTADO_BUSQUEDA: La Web no responde o ha cambiado de URL: " + item.url + " / DATA: " + data)
+ pass
+
+ cnt_next += 1
+ if not data or not scrapertools.find_single_match(data, pattern):
+ logger.error("ERROR 01: LISTADO_BUSQUEDA: La Web no responde o ha cambiado de URL: " + item.url + item.post + " / DATA: " + data)
+ #Si no hay datos consistentes, llamamos al método de fail_over para que encuentre un canal que esté activo y pueda gestionar el submenú
+ item, data = generictools.fail_over_newpct1(item, pattern)
+
+ if not data: #Si no ha logrado encontrar nada, salimos
+ itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel.capitalize() + '[/COLOR]: Ningún canal NewPct1 activo'))
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: LISTADO_BUSQUEDA:. 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 item.channel_alt: #Si ha habido fail-over, lo comento
+ host = host.replace(item.channel_alt, item.channel)
#Obtiene la dirección de la próxima página, si la hay
try:
@@ -824,6 +875,11 @@ def listado_busqueda(item):
def findvideos(item):
from core import channeltools
logger.info()
+
+ #Renombramos el canal al nombre de clone elegido
+ item.channel = channel_clone_name
+ if item.category: item.category = channel_clone_name.capitalize()
+
itemlist = []
# Cualquiera de las tres opciones son válidas
@@ -934,9 +990,20 @@ def findvideos(item):
try:
data = re.sub(r"\n|\r|\t|\s{2}|()", "", httptools.downloadpage(item.url).data)
except:
+ pass
+
+ patron = 'class="btn-torrent">.*?window.location.href = "(.*?)";' #Patron para .torrent
+ #Verificamos si se ha cargado una página, y si además tiene la estructura correcta
+ if not data or not scrapertools.find_single_match(data, patron):
logger.error("ERROR 01: FINDVIDEOS: La Web no responde o la URL es erronea: " + item.url + " / DATA: " + data)
+
+ #Si no hay datos consistentes, llamamos al método de fail_over para que encuentre un canal que esté activo y pueda gestionar el vídeo
+ item, data = generictools.fail_over_newpct1(item, patron)
+ if not data: #Si no ha logrado encontrar nada, salimos
+ itemlist.append(item.clone(action='', title="[COLOR yellow]" + item.channel.capitalize() + '[/COLOR]: Ningún canal NewPct1 activo'))
itemlist.append(item.clone(action='', title=item.channel.capitalize() + ': ERROR 01: FINDVIDEOS:. La Web no responde o la URL es erronea. 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
+
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
data = data.replace("$!", "#!").replace("'", "\"").replace("ñ", "ñ").replace("//pictures", "/pictures")
@@ -948,6 +1015,8 @@ def findvideos(item):
else:
item.title = re.sub(r'\s\[\d+,?\d*?\s\w[b|B]\]', '', item.title) #Quitamos size de título, si lo traía
item.title = '%s [%s]' % (item.title, size) #Agregamos size al final del título
+ if size:
+ size = size.replace('GB', 'G B').replace('Gb', 'G b').replace('MB', 'M B').replace('Mb', 'M b')
item.quality = re.sub(r'\s\[\d+,?\d*?\s\w[b|B]\]', '', item.quality) #Quitamos size de calidad, si lo traía
#Llamamos al método para crear el título general del vídeo, con toda la información obtenida de TMDB
@@ -957,7 +1026,6 @@ def findvideos(item):
item_local = item.clone()
# obtenemos la url torrent
- patron = 'class="btn-torrent">.*?window.location.href = "(.*?)";'
item_local.url = scrapertools.find_single_match(data, patron)
if not item_local.url: #error
logger.error("ERROR 02: FINDVIDEOS: El archivo Torrent no existe o ha cambiado la estructura de la Web " + " / PATRON: " + patron + " / DATA: " + data)
@@ -969,17 +1037,17 @@ def findvideos(item):
#Ahora pintamos el link del Torrent, si lo hay
if item_local.url: # Hay Torrent ?
- item_local.title = '[COLOR yellow][?][/COLOR] [COLOR yellow][Torrent][/COLOR] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (item_local.quality, str(item_local.language)) #Preparamos título de Torrent
+ if size:
+ quality = '%s [%s]' % (item_local.quality, size) #Agregamos size al final del título
+ else:
+ quality = item_local.quality
+ item_local.title = '[COLOR yellow][?][/COLOR] [COLOR yellow][Torrent][/COLOR] [COLOR limegreen][%s][/COLOR] [COLOR red]%s[/COLOR]' % (quality, str(item_local.language)) #Preparamos título de Torrent
item_local.title = re.sub(r'\s\[COLOR \w+\]\[\[?\]?\]\[\/COLOR\]', '', item_local.title).strip() #Quitamos etiquetas vacías
item_local.title = re.sub(r'\s\[COLOR \w+\]\[\/COLOR\]', '', item_local.title).strip() #Quitamos colores vacíos
item_local.alive = "??" #Calidad del link sin verificar
item_local.action = "play" #Visualizar vídeo
item_local.server = "torrent" #Servidor
- if size:
- quality = '%s [%s]' % (item_local.quality, size) #Agregamos size al final del título
- else:
- quality = item_local.quality
-
+
itemlist.append(item_local.clone(quality=quality)) #Pintar pantalla
logger.debug("TORRENT: " + item_local.url + " / title gen/torr: " + item.title + " / " + item_local.title + " / calidad: " + item_local.quality + " / tamaño: " + size + " / content: " + item_local.contentTitle + " / " + item_local.contentSerieName)
@@ -1163,9 +1231,20 @@ def findvideos(item):
def episodios(item):
logger.info()
+
+ #Renombramos el canal al nombre de clone elegido
+ item.channel = channel_clone_name
+ if item.category: item.category = channel_clone_name.capitalize()
+
itemlist = []
+ # Obtener la información actualizada de la Serie. TMDB es imprescindible para Videoteca
+ if not item.infoLabels['tmdb_id']:
+ tmdb.set_infoLabels(item, True)
+
max_temp = 1
+ if item.infoLabels['number_of_seasons']:
+ max_temp = item.infoLabels['number_of_seasons']
y = []
if modo_ultima_temp and item.library_playcounts: #Averiguar cuantas temporadas hay en Videoteca
patron = 'season (\d+)'
@@ -1173,16 +1252,30 @@ def episodios(item):
for x in matches:
y += [int(x)]
max_temp = max(y)
-
- # Obtener la información actualizada de la Serie. TMDB es imprescindible para Videoteca
- if not item.infoLabels['tmdb_id']:
- tmdb.set_infoLabels(item, True)
-
+
data = ''
try:
data = re.sub(r"\n|\r|\t|\s{2,}", "", httptools.downloadpage(item.url).data)
- except: #Algún error de proceso, salimos
- logger.error("ERROR 01: EPISODIOS: La Web no responde o la URL es erronea" + item.url)
+ patron = '' % "buscar-list" # item.pattern
+ data_alt = ''
+ if data: data_alt = scrapertools.get_match(data, patron)
+ except: #Algún error de proceso
+ pass
+
+ if "pelisyseries.com" in item.url:
+ pattern = ']*>