Merge remote-tracking branch 'alfa-addon/master' into Fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.alfa" name="Alfa" version="2.4.3" provider-name="Alfa Addon">
|
<addon id="plugin.video.alfa" name="Alfa" version="2.4.4" provider-name="Alfa Addon">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.libtorrent" optional="true"/>
|
<import addon="script.module.libtorrent" optional="true"/>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<extension point="xbmc.addon.metadata">
|
<extension point="xbmc.addon.metadata">
|
||||||
<summary lang="es">Navega con Kodi por páginas web.</summary>
|
<summary lang="es">Navega con Kodi por páginas web.</summary>
|
||||||
<assets>
|
<assets>
|
||||||
<icon>icon.png</icon>
|
<icon>icon1.png</icon>
|
||||||
<fanart>fanart.jpg</fanart>
|
<fanart>fanart.jpg</fanart>
|
||||||
<screenshot>resources/media/themes/ss/1.jpg</screenshot>
|
<screenshot>resources/media/themes/ss/1.jpg</screenshot>
|
||||||
<screenshot>resources/media/themes/ss/2.jpg</screenshot>
|
<screenshot>resources/media/themes/ss/2.jpg</screenshot>
|
||||||
@@ -19,11 +19,8 @@
|
|||||||
</assets>
|
</assets>
|
||||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||||
» cinetux » descargasmix
|
» pelisplus » pelisplusco
|
||||||
» hdfull » peliculasdk
|
» gvideo ¤ arreglos internos
|
||||||
» pelisfox » yaske
|
|
||||||
» gvideo » powvideo
|
|
||||||
» yourupload ¤ arreglos internos
|
|
||||||
</news>
|
</news>
|
||||||
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
||||||
<summary lang="en">Browse web pages using Kodi</summary>
|
<summary lang="en">Browse web pages using Kodi</summary>
|
||||||
|
|||||||
@@ -146,8 +146,7 @@ def search(item, texto):
|
|||||||
logger.info()
|
logger.info()
|
||||||
texto = texto.replace(" ", "+")
|
texto = texto.replace(" ", "+")
|
||||||
item.url = host + 'busqueda/?s=' + texto
|
item.url = host + 'busqueda/?s=' + texto
|
||||||
if not item.extra:
|
|
||||||
item.extra = 'peliculas/'
|
|
||||||
try:
|
try:
|
||||||
if texto != '':
|
if texto != '':
|
||||||
return lista(item)
|
return lista(item)
|
||||||
@@ -174,7 +173,7 @@ def lista(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
if item.title != 'Buscar':
|
if item.action != 'search':
|
||||||
patron = '<img.*?width="147" heigh="197".*?src="([^"]+)".*?>.*?.<i class="icon online-play"><\/i>.*?.<h2 ' \
|
patron = '<img.*?width="147" heigh="197".*?src="([^"]+)".*?>.*?.<i class="icon online-play"><\/i>.*?.<h2 ' \
|
||||||
'class="title title-.*?">.*?.<a href="([^"]+)" title="([^"]+)">.*?>'
|
'class="title title-.*?">.*?.<a href="([^"]+)" title="([^"]+)">.*?>'
|
||||||
actual = scrapertools.find_single_match(data,
|
actual = scrapertools.find_single_match(data,
|
||||||
@@ -197,8 +196,8 @@ def lista(item):
|
|||||||
# de tmdb
|
# de tmdb
|
||||||
filtro_list = filtro_list.items()
|
filtro_list = filtro_list.items()
|
||||||
|
|
||||||
|
if item.action != 'search':
|
||||||
|
|
||||||
if item.title != 'Buscar':
|
|
||||||
new_item=(
|
new_item=(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
contentType=tipo,
|
contentType=tipo,
|
||||||
@@ -217,6 +216,14 @@ def lista(item):
|
|||||||
new_item.contentTitle = scrapedtitle
|
new_item.contentTitle = scrapedtitle
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
else:
|
else:
|
||||||
|
if item.extra=='':
|
||||||
|
item.extra = scrapertools.find_single_match(url, 'serie|pelicula')+'s/'
|
||||||
|
if 'series/' in item.extra:
|
||||||
|
accion = 'temporadas'
|
||||||
|
tipo = 'tvshow'
|
||||||
|
else:
|
||||||
|
accion = 'findvideos'
|
||||||
|
tipo = 'movie'
|
||||||
item.extra = item.extra.rstrip('s/')
|
item.extra = item.extra.rstrip('s/')
|
||||||
if item.extra in url:
|
if item.extra in url:
|
||||||
new_item=(
|
new_item=(
|
||||||
@@ -238,7 +245,7 @@ def lista(item):
|
|||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
if item.title != 'Buscar' and actual != '':
|
if item.action != 'search' and actual != '':
|
||||||
if itemlist != []:
|
if itemlist != []:
|
||||||
next_page = str(int(actual) + 1)
|
next_page = str(int(actual) + 1)
|
||||||
next_page_url = item.extra + 'pag-' + next_page
|
next_page_url = item.extra + 'pag-' + next_page
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ def list_all (item):
|
|||||||
contentType = 'pelicula'
|
contentType = 'pelicula'
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
|
|
||||||
patron = 'item-%s><a href=(.*?)><figure><img src=https:(.*?)'%contentType
|
patron = 'item-%s><a href=(.*?)><figure><img.*?data-src=(.*?) alt=.*?<p>(.*?)<\/p><span>(\d{4})<\/span>'%contentType
|
||||||
patron += ' alt=><\/figure><p>(.*?)<\/p><span>(.*?)<\/span>'
|
|
||||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches:
|
||||||
url = host+scrapedurl
|
url = host+scrapedurl+'p001/'
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
plot= ''
|
plot= ''
|
||||||
contentTitle=scrapedtitle
|
contentTitle=scrapedtitle
|
||||||
@@ -263,7 +263,9 @@ def findvideos(item):
|
|||||||
video_list = []
|
video_list = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
patron = 'data-source=(.*?) data.*?-srt=(.*?) data-iframe=0><a>(.*?) - (.*?)<\/a>'
|
|
||||||
|
patron = 'data-source=(.*?) .*?tab.*?data.*?srt=(.*?) data-iframe=><a>(.*?)\s?-\s?(.*?)<\/a>'
|
||||||
|
|
||||||
matches = matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for url, sub, language, quality in matches:
|
for url, sub, language, quality in matches:
|
||||||
|
|||||||
@@ -557,12 +557,12 @@ def detalles(item):
|
|||||||
itemlist.append(item.clone(channel="trailertools", action="buscartrailer", title="Buscar Tráiler",
|
itemlist.append(item.clone(channel="trailertools", action="buscartrailer", title="Buscar Tráiler",
|
||||||
text_color=color5))
|
text_color=color5))
|
||||||
|
|
||||||
# try:
|
try:
|
||||||
# images['tmdb'] = ob_tmdb.result["images"]
|
images['tmdb'] = ob_tmdb.result["images"]
|
||||||
# itemlist.append(item.clone(action="imagenes", title="Lista de Imágenes", text_color=color5, images=images,
|
itemlist.append(item.clone(action="imagenes", title="Lista de Imágenes", text_color=color5, images=images,
|
||||||
# extra="menu"))
|
extra="menu"))
|
||||||
# except:
|
except:
|
||||||
# pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if item.contentType == "movie" and item.infoLabels["year"] < 2014:
|
if item.contentType == "movie" and item.infoLabels["year"] < 2014:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
# Server management
|
# Server management
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
@@ -75,7 +75,6 @@ def get_servers_itemlist(itemlist, fnc=None, sort=False):
|
|||||||
@param sort: indica si el listado resultante se ha de ordenar en funcion de la lista de servidores favoritos
|
@param sort: indica si el listado resultante se ha de ordenar en funcion de la lista de servidores favoritos
|
||||||
@type sort: bool
|
@type sort: bool
|
||||||
"""
|
"""
|
||||||
server_stats = {}
|
|
||||||
# Recorre los servidores
|
# Recorre los servidores
|
||||||
for serverid in get_servers_list().keys():
|
for serverid in get_servers_list().keys():
|
||||||
server_parameters = get_server_parameters(serverid)
|
server_parameters = get_server_parameters(serverid)
|
||||||
@@ -90,7 +89,6 @@ def get_servers_itemlist(itemlist, fnc=None, sort=False):
|
|||||||
for x in range(len(match.groups())):
|
for x in range(len(match.groups())):
|
||||||
url = url.replace("\\%s" % (x + 1), match.groups()[x])
|
url = url.replace("\\%s" % (x + 1), match.groups()[x])
|
||||||
|
|
||||||
server_stats[serverid] = "found"
|
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
if match.group() in item.url:
|
if match.group() in item.url:
|
||||||
if not item.contentThumbnail:
|
if not item.contentThumbnail:
|
||||||
@@ -102,8 +100,6 @@ def get_servers_itemlist(itemlist, fnc=None, sort=False):
|
|||||||
else:
|
else:
|
||||||
item.url = url
|
item.url = url
|
||||||
|
|
||||||
save_server_stats(server_stats, "find_videos")
|
|
||||||
|
|
||||||
# Eliminamos los servidores desactivados
|
# Eliminamos los servidores desactivados
|
||||||
itemlist = filter(lambda i: not i.server or is_server_enabled(i.server), itemlist)
|
itemlist = filter(lambda i: not i.server or is_server_enabled(i.server), itemlist)
|
||||||
|
|
||||||
@@ -188,10 +184,6 @@ def findvideosbyserver(data, serverid):
|
|||||||
devuelve.append(value)
|
devuelve.append(value)
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
|
|
||||||
# Guardar estadisticas
|
|
||||||
if devuelve:
|
|
||||||
save_server_stats({serverid: "found"}, "find_videos")
|
|
||||||
|
|
||||||
return devuelve
|
return devuelve
|
||||||
|
|
||||||
|
|
||||||
@@ -324,11 +316,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
|||||||
try:
|
try:
|
||||||
logger.info("Invocando a %s.get_video_url" % server)
|
logger.info("Invocando a %s.get_video_url" % server)
|
||||||
response = serverid.get_video_url(page_url=url, video_password=video_password)
|
response = serverid.get_video_url(page_url=url, video_password=video_password)
|
||||||
if response:
|
|
||||||
save_server_stats({server: "sucess"}, "resolve")
|
|
||||||
video_urls.extend(response)
|
video_urls.extend(response)
|
||||||
except:
|
except:
|
||||||
save_server_stats({server: "error"}, "resolve")
|
|
||||||
logger.error("Error al obtener la url en modo free")
|
logger.error("Error al obtener la url en modo free")
|
||||||
error_messages.append("Se ha producido un error en %s" % server_name)
|
error_messages.append("Se ha producido un error en %s" % server_name)
|
||||||
import traceback
|
import traceback
|
||||||
@@ -343,16 +332,12 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
|
|||||||
password=config.get_setting("password", server=opcion),
|
password=config.get_setting("password", server=opcion),
|
||||||
video_password=video_password)
|
video_password=video_password)
|
||||||
if response and response[0][1]:
|
if response and response[0][1]:
|
||||||
if opcion == server:
|
|
||||||
save_server_stats({server: "sucess"}, "resolve")
|
|
||||||
video_urls.extend(response)
|
video_urls.extend(response)
|
||||||
elif response and response[0][0]:
|
elif response and response[0][0]:
|
||||||
error_messages.append(response[0][0])
|
error_messages.append(response[0][0])
|
||||||
else:
|
else:
|
||||||
error_messages.append("Se ha producido un error en %s" % server_name)
|
error_messages.append("Se ha producido un error en %s" % server_name)
|
||||||
except:
|
except:
|
||||||
if opcion == server:
|
|
||||||
save_server_stats({server: "error"}, "resolve")
|
|
||||||
logger.error("Error en el servidor: %s" % opcion)
|
logger.error("Error en el servidor: %s" % opcion)
|
||||||
error_messages.append("Se ha producido un error en %s" % server_name)
|
error_messages.append("Se ha producido un error en %s" % server_name)
|
||||||
import traceback
|
import traceback
|
||||||
@@ -720,41 +705,3 @@ def filter_servers(servers_list):
|
|||||||
servers_list = servers_list_filter
|
servers_list = servers_list_filter
|
||||||
|
|
||||||
return servers_list
|
return servers_list
|
||||||
|
|
||||||
|
|
||||||
def save_server_stats(stats, type="find_videos"):
|
|
||||||
if not config.get_setting("server_stats"):
|
|
||||||
return
|
|
||||||
|
|
||||||
stats_file = os.path.join(config.get_data_path(), "server_stats.json")
|
|
||||||
today = datetime.datetime.now().strftime("%Y%m%d")
|
|
||||||
|
|
||||||
# Leemos el archivo
|
|
||||||
try:
|
|
||||||
server_stats = jsontools.load(open(stats_file, "rb").read())
|
|
||||||
except:
|
|
||||||
server_stats = {"created": time.time(), "data": {}}
|
|
||||||
|
|
||||||
# Actualizamos los datos
|
|
||||||
for server in stats:
|
|
||||||
if not server in server_stats["data"]:
|
|
||||||
server_stats["data"][server] = {}
|
|
||||||
|
|
||||||
if not today in server_stats["data"][server]:
|
|
||||||
server_stats["data"][server][today] = {"find_videos": {"found": 0}, "resolve": {"sucess": 0, "error": 0}}
|
|
||||||
|
|
||||||
server_stats["data"][server][today][type][stats[server]] += 1
|
|
||||||
|
|
||||||
# Guardamos el archivo
|
|
||||||
open(stats_file, "wb").write(jsontools.dump(server_stats))
|
|
||||||
|
|
||||||
# Enviamos al servidor
|
|
||||||
return
|
|
||||||
if time.time() - server_stats["created"] > 86400: # 86400: #1 Dia
|
|
||||||
from core import httptools
|
|
||||||
if httptools.downloadpage("url servidor", headers={'Content-Type': 'application/json'},
|
|
||||||
post=jsontools.dump(server_stats)).sucess:
|
|
||||||
os.remove(stats_file)
|
|
||||||
logger.info("Datos enviados correctamente")
|
|
||||||
else:
|
|
||||||
logger.info("No se han podido enviar los datos")
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 836 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 153 KiB |
@@ -135,7 +135,7 @@ def render_items(itemlist, parent_item):
|
|||||||
if item.fanart:
|
if item.fanart:
|
||||||
fanart = item.fanart
|
fanart = item.fanart
|
||||||
else:
|
else:
|
||||||
fanart = os.path.join(config.get_runtime_path(), "fanart.jpg")
|
fanart = os.path.join(config.get_runtime_path(), "fanart-xmas.jpg")
|
||||||
|
|
||||||
# Creamos el listitem
|
# Creamos el listitem
|
||||||
listitem = xbmcgui.ListItem(item.title)
|
listitem = xbmcgui.ListItem(item.title)
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ def ask_set_content(flag, silent=False):
|
|||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
heading = "Alfa Auto-configuración"
|
heading = "Alfa Auto-configuración"
|
||||||
linea1 = "¿Desea que Alfa auto-configure la videteoca de Kodi?"
|
linea1 = "¿Desea que Alfa auto-configure la videoteca de Kodi?"
|
||||||
linea2 = "Si pulsa 'No' podra hacerlo desde 'Configuración > Preferencia > Rutas'."
|
linea2 = "Si pulsa 'No' podra hacerlo desde 'Configuración > Preferencia > Rutas'."
|
||||||
if platformtools.dialog_yesno(heading, linea1, linea2):
|
if platformtools.dialog_yesno(heading, linea1, linea2):
|
||||||
do_config()
|
do_config()
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
<setting id="resolve_priority" type="enum" label="Método prioritario" values="Free primero|Premium primero|Debriders primero" default="0"/>
|
<setting id="resolve_priority" type="enum" label="Método prioritario" values="Free primero|Premium primero|Debriders primero" default="0"/>
|
||||||
<setting id="resolve_stop" type="bool" label="Dejar de buscar cuando encuentre una opción" default="true"/>
|
<setting id="resolve_stop" type="bool" label="Dejar de buscar cuando encuentre una opción" default="true"/>
|
||||||
<setting id="hidepremium" type="bool" label="Ocultar servidores de pago sin cuenta" default="false"/>
|
<setting id="hidepremium" type="bool" label="Ocultar servidores de pago sin cuenta" default="false"/>
|
||||||
<setting id="server_stats" type="bool" label="Enviar estadisticas sobre el uso de servidores" default="true"/>
|
|
||||||
<setting type="sep"/>
|
<setting type="sep"/>
|
||||||
<setting label="Canales para adultos" type="lsep"/>
|
<setting label="Canales para adultos" type="lsep"/>
|
||||||
<setting id="adult_aux_intro_password" type="text" label="Contraseña (por defecto 0000):" option="hidden" default=""/>
|
<setting id="adult_aux_intro_password" type="text" label="Contraseña (por defecto 0000):" option="hidden" default=""/>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ def test_video_exists(page_url):
|
|||||||
return False, "[gvideo] No tienes permiso para acceder a este video"
|
return False, "[gvideo] No tienes permiso para acceder a este video"
|
||||||
if "Se ha producido un error" in response.data:
|
if "Se ha producido un error" in response.data:
|
||||||
return False, "[gvideo] Se ha producido un error en el reproductor de google"
|
return False, "[gvideo] Se ha producido un error en el reproductor de google"
|
||||||
|
if "No+se+puede+procesar+este" in response.data:
|
||||||
|
return False, "[gvideo] No se puede procesar este video"
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user