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"?>
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.1.2" provider-name="Alfa Addon">
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.1.3" provider-name="Alfa Addon">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
@@ -19,13 +19,12 @@
|
||||
</assets>
|
||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||
» cinecalidad » estadepelis
|
||||
» datoporn » seriesyonkis
|
||||
» allcalidad » allpeliculas
|
||||
» cartoonlatino » pasateatorrent
|
||||
» vidz7 » zonatorrent
|
||||
» gvideo » okru
|
||||
» openload ¤ arreglos internos
|
||||
» repelis » allcalidad
|
||||
» cinetux » allpeliculas
|
||||
» hdfull » zonatorrent
|
||||
¤ arreglos internos
|
||||
|
||||
[COLOR green]Gracias a [COLOR yellow]prpeaprendiz[/COLOR] por su colaboración en esta versión[/COLOR]
|
||||
</news>
|
||||
<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>
|
||||
|
||||
@@ -18,6 +18,14 @@
|
||||
"direct"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
@@ -41,6 +49,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,11 +3,20 @@
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__='allcalidad'
|
||||
|
||||
host = "http://allcalidad.com/"
|
||||
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
@@ -28,6 +37,8 @@ def newest(categoria):
|
||||
item.url = host
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'category/animacion/'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'category/torror/'
|
||||
itemlist = peliculas(item)
|
||||
if "Pagina" in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
@@ -84,20 +95,21 @@ def peliculas(item):
|
||||
year = scrapertools.find_single_match(varios, 'Año.*?kinopoisk">([^<]+)')
|
||||
year = scrapertools.find_single_match(year, '[0-9]{4}')
|
||||
mtitulo = titulo + " (" + idioma + ") (" + year + ")"
|
||||
new_item = Item(channel = item.channel,
|
||||
action = "findvideos",
|
||||
title = mtitulo,
|
||||
fulltitle = titulo,
|
||||
thumbnail = thumbnail,
|
||||
url = url,
|
||||
contentTitle = titulo,
|
||||
contentType="movie",
|
||||
language = idioma
|
||||
)
|
||||
if year:
|
||||
new_item.infoLabels['year'] = int(year)
|
||||
itemlist.append(new_item)
|
||||
item.infoLabels['year'] = int(year)
|
||||
itemlist.append(item.clone(channel = item.channel,
|
||||
action = "findvideos",
|
||||
title = mtitulo,
|
||||
fulltitle = titulo,
|
||||
thumbnail = thumbnail,
|
||||
url = url,
|
||||
contentTitle = titulo,
|
||||
contentType="movie",
|
||||
language = idioma
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
url_pagina = scrapertools.find_single_match(data, 'next" href="([^"]+)')
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
if url_pagina != "":
|
||||
pagina = "Pagina: " + scrapertools.find_single_match(url_pagina, "page/([0-9]+)")
|
||||
itemlist.append(Item(channel = item.channel, action = "peliculas", title = pagina, url = url_pagina))
|
||||
@@ -121,13 +133,12 @@ def findvideos(item):
|
||||
elif "vimeo" in url:
|
||||
url += "|" + "http://www.allcalidad.com"
|
||||
itemlist.append(
|
||||
Item(channel = item.channel,
|
||||
item.clone(channel = item.channel,
|
||||
action = "play",
|
||||
title = titulo,
|
||||
fulltitle = item.fulltitle,
|
||||
thumbnail = item.thumbnail,
|
||||
url = url
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist, True)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
if itemlist:
|
||||
itemlist.append(Item(channel = item.channel))
|
||||
@@ -137,8 +148,7 @@ def findvideos(item):
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
filtro=True, action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -65,27 +65,33 @@ def findvideos(item):
|
||||
patron += '>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, calidad in matches:
|
||||
itemlist.append(Item(
|
||||
itemlist.append(item.clone(
|
||||
channel = item.channel,
|
||||
action = "play",
|
||||
title = calidad,
|
||||
fulltitle = item.title,
|
||||
contentThumbnail = item.thumbnail,
|
||||
url = url,
|
||||
))
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
itemlist.append(Item(channel=item.channel))
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
filtro=True, action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle
|
||||
))
|
||||
try:
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
itemlist.append(Item(channel=item.channel))
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
item.thumbnail = item.contentThumbnail
|
||||
return [item]
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
@@ -112,6 +118,10 @@ def lista(item):
|
||||
itemlist.append(item.clone(action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumb,
|
||||
plot=plot, context=["buscar_trailer"], contentTitle=title, contentType="movie"))
|
||||
|
||||
try:
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
pagina = scrapertools.find_single_match(item.url, 'page=([0-9]+)')
|
||||
item.url = item.url.replace(pagina, "")
|
||||
if pagina == "":
|
||||
@@ -121,12 +131,6 @@ def lista(item):
|
||||
if item.extra != "busqueda":
|
||||
itemlist.append(Item(channel = item.channel, action="lista", title="Pagina %s" %pagina, url=item.url, extra1 = item.extra1
|
||||
))
|
||||
try:
|
||||
# Obtenemos los datos basicos de todas las peliculas mediante multihilos
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
|
||||
return itemlist
|
||||
|
||||
def search(item, texto):
|
||||
|
||||
@@ -26,6 +26,14 @@
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
@@ -42,6 +50,14 @@
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
|
||||
@@ -5,10 +5,18 @@ import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = "http://www.cineasiaenlinea.com/"
|
||||
__channel__='cineasiaenlinea'
|
||||
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
# Configuracion del canal
|
||||
__perfil__ = int(config.get_setting('perfil', 'cineasiaenlinea'))
|
||||
|
||||
@@ -75,11 +83,13 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + "archivos/peliculas"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "genero/terror"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
@@ -110,6 +120,7 @@ def peliculas(item):
|
||||
thumbnail=scrapedthumbnail, infoLabels=infolab,
|
||||
contentTitle=title, contentType="movie", quality=calidad))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)"')
|
||||
if next_page:
|
||||
itemlist.append(item.clone(title=">> Página Siguiente", url=next_page))
|
||||
|
||||
@@ -70,6 +70,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -382,6 +382,8 @@ def newest(categoria):
|
||||
item.url = 'http://www.cinecalidad.to'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = 'http://www.cinecalidad.to/genero-peliculas/infantil/'
|
||||
elif categoria == 'terror':
|
||||
item.url = 'http://www.cinecalidad.to/genero-peliculas/terror/'
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].title == 'Página siguiente >>':
|
||||
itemlist.pop()
|
||||
|
||||
@@ -152,6 +152,7 @@ def peliculas(item):
|
||||
new_item.infoLabels['year'] = int(year)
|
||||
itemlist.append(new_item)
|
||||
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
# Extrae el paginador
|
||||
next_page_link = scrapertools.find_single_match(data, '<link rel="next" href="([^"]+)')
|
||||
if next_page_link:
|
||||
@@ -273,9 +274,8 @@ def findvideos(item):
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
filtro=True, action="add_pelicula_to_library", url=item.url,
|
||||
infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle,
|
||||
extra="library"))
|
||||
action="add_pelicula_to_library", url=item.url
|
||||
))
|
||||
|
||||
else:
|
||||
itemlist.append(item.clone(title="No hay enlaces disponibles", action="", text_color=color3))
|
||||
@@ -319,34 +319,35 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
|
||||
scrapedurl = match[0]
|
||||
scrapedserver = match[1]
|
||||
scrapedcalidad = match[2]
|
||||
scrapedlanguage = match[3]
|
||||
language = match[3]
|
||||
scrapedtipo = match[4]
|
||||
if t_tipo.upper() not in scrapedtipo.upper():
|
||||
continue
|
||||
title = " Mirror en %s (" + scrapedlanguage + ")"
|
||||
title = " Mirror en %s (" + language + ")"
|
||||
if len(scrapedcalidad.strip()) > 0:
|
||||
title += " (Calidad " + scrapedcalidad.strip() + ")"
|
||||
|
||||
if filtro_idioma == 3 or item.filtro:
|
||||
lista_enlaces.append(item.clone(title=title, action="play", text_color=color2,
|
||||
url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage,
|
||||
url=scrapedurl, server=scrapedserver,
|
||||
extra=item.url, contentThumbnail = item.thumbnail,
|
||||
language=scrapedlanguage))
|
||||
language=language))
|
||||
else:
|
||||
idioma = dict_idiomas[language]
|
||||
if idioma == filtro_idioma:
|
||||
lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl,
|
||||
lista_enlaces.append(item.clone(title=title, action="play", text_color=color2,
|
||||
url=scrapedurl, server=scrapedserver,
|
||||
extra=item.url, contentThumbnail = item.thumbnail,
|
||||
language=scrapedlanguage))
|
||||
language=language))
|
||||
else:
|
||||
if language not in filtrados:
|
||||
filtrados.append(language)
|
||||
lista_enlaces = servertools.get_servers_itemlist(lista_enlaces, lambda i: i.title % i.server.capitalize())
|
||||
if filtro_idioma != 3:
|
||||
if len(filtrados) > 0:
|
||||
title = "Mostrar enlaces filtrados en %s" % ", ".join(filtrados)
|
||||
title = "Mostrar también enlaces filtrados en %s" % ", ".join(filtrados)
|
||||
lista_enlaces.append(item.clone(title=title, action="findvideos", url=item.url, text_color=color3,
|
||||
filtro=True))
|
||||
lista_enlaces = servertools.get_servers_itemlist(lista_enlaces, lambda i: i.title % i.server.capitalize())
|
||||
return lista_enlaces
|
||||
|
||||
|
||||
|
||||
8
plugin.video.alfa/channels/doomtv.json
Executable file → Normal file
8
plugin.video.alfa/channels/doomtv.json
Executable file → Normal file
@@ -47,6 +47,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -206,7 +206,8 @@ def newest(categoria):
|
||||
item.url = host +'peliculas/page/1'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'categoria/animacion/'
|
||||
|
||||
elif categoria == 'terror':
|
||||
item.url = host + '/categoria/terror/'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
|
||||
@@ -69,6 +69,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -459,10 +459,12 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host
|
||||
item.extra = 'peliculas'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'search?q=animación'
|
||||
item.extra = 'peliculas'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'search?q=terror'
|
||||
|
||||
item.extra = 'peliculas'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
|
||||
@@ -313,7 +313,7 @@ def fichas(item):
|
||||
for scrapedurl, scrapedthumbnail, scrapedlangs, scrapedrating, scrapedtitle, scrapedid in matches:
|
||||
|
||||
thumbnail = scrapedthumbnail.replace("/tthumb/130x190/", "/thumbs/")
|
||||
|
||||
language = ''
|
||||
title = scrapedtitle.strip()
|
||||
show = title
|
||||
contentTitle = scrapedtitle.strip()
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
|
||||
@@ -61,10 +61,14 @@ def newest(categoria):
|
||||
item.url = "http://www.inkapelis.com/"
|
||||
item.action = "entradas"
|
||||
item.extra = "Novedades"
|
||||
itemlist = entradas(item)
|
||||
|
||||
if itemlist[-1].action == "entradas":
|
||||
itemlist.pop()
|
||||
if categoria == "terror":
|
||||
item.url = "https://www.inkapelis.com/genero/terror/"
|
||||
item.action = "entradas"
|
||||
itemlist = entradas(item)
|
||||
|
||||
if itemlist[-1].action == "entradas":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
@@ -278,9 +282,15 @@ def entradas(item):
|
||||
title += " [Próximamente]"
|
||||
thumbnail = scrapedthumbnail.replace("w185", "original")
|
||||
|
||||
filtro_thumb = scrapedthumbnail.replace("https://image.tmdb.org/t/p/w185", "")
|
||||
filtro_list = {"poster_path": filtro_thumb}
|
||||
filtro_list = filtro_list.items()
|
||||
|
||||
itemlist.append(item.clone(action="findvideos", title=title, url=url, contentTitle=scrapedtitle,
|
||||
fulltitle=scrapedtitle, thumbnail=thumbnail, context=["buscar_trailer"],
|
||||
contentType="movie"))
|
||||
contentType="movie", infoLabels={'filtro': filtro_list}))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
# Extrae la marca de la siguiente página
|
||||
next_page = scrapertools.find_single_match(data, '<span class="current">.*?<\/span><a href="([^"]+)"')
|
||||
|
||||
@@ -47,6 +47,14 @@
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -260,3 +260,27 @@ def play(item):
|
||||
itemlist.append(item.clone(action="play", server=enlaces[0][2], url=enlaces[0][1]))
|
||||
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "terror":
|
||||
item.url = host +"/listado/terror/"
|
||||
item.action = "updated"
|
||||
item.page = 0
|
||||
itemlist = updated(item)
|
||||
|
||||
if itemlist[-1].action == "updated":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -70,6 +70,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -404,6 +404,9 @@ def newest(categoria):
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'categoria/animacion-e-infantil/'
|
||||
item.extra = 'peliculas'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'categoria/terror/'
|
||||
item.extra = 'peliculas'
|
||||
itemlist = todas(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
}
|
||||
],
|
||||
"categories": [
|
||||
"movie",
|
||||
"adult"
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
|
||||
228
plugin.video.alfa/channels/news.py
Executable file → Normal file
228
plugin.video.alfa/channels/news.py
Executable file → Normal file
@@ -37,43 +37,49 @@ def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
list_canales = get_channels_list()
|
||||
list_canales, any_active = get_channels_list()
|
||||
|
||||
if list_canales['peliculas']:
|
||||
thumbnail = get_thumb("channels_movie.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="peliculas", title="Películas",
|
||||
thumbnail=thumbnail)
|
||||
#if list_canales['peliculas']:
|
||||
thumbnail = get_thumb("channels_movie.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="peliculas", title="Películas",
|
||||
thumbnail=thumbnail)
|
||||
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
#if list_canales['terror']:
|
||||
thumbnail = get_thumb("channels_horror.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="terror", title="Peliculas de miedo!",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
if list_canales['infantiles']:
|
||||
thumbnail = get_thumb("channels_children.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="infantiles", title="Para niños",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
#if list_canales['infantiles']:
|
||||
thumbnail = get_thumb("channels_children.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="infantiles", title="Para niños",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
if list_canales['series']:
|
||||
thumbnail = get_thumb("channels_tvshow.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="series", title="Episodios de series",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
#if list_canales['series']:
|
||||
thumbnail = get_thumb("channels_tvshow.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="series", title="Episodios de series",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
if list_canales['anime']:
|
||||
thumbnail = get_thumb("channels_anime.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="anime", title="Episodios de anime",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
#if list_canales['anime']:
|
||||
thumbnail = get_thumb("channels_anime.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="anime", title="Episodios de anime",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
if list_canales['documentales']:
|
||||
thumbnail = get_thumb("channels_documentary.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="documentales", title="Documentales",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
#if list_canales['documentales']:
|
||||
thumbnail = get_thumb("channels_documentary.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="documentales", title="Documentales",
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -89,8 +95,8 @@ def set_category_context(item):
|
||||
def get_channels_list():
|
||||
logger.info()
|
||||
|
||||
list_canales = {'peliculas': [], 'infantiles': [], 'series': [], 'anime': [], 'documentales': []}
|
||||
|
||||
list_canales = {'peliculas': [], 'terror': [], 'infantiles': [], 'series': [], 'anime': [], 'documentales': []}
|
||||
any_active = False
|
||||
# Rellenar listas de canales disponibles
|
||||
channels_path = os.path.join(config.get_runtime_path(), "channels", '*.json')
|
||||
channel_language = config.get_setting("channel_language", default="all")
|
||||
@@ -113,13 +119,15 @@ def get_channels_list():
|
||||
continue
|
||||
|
||||
# Incluir en cada categoria, si en su configuracion el canal esta activado para mostrar novedades
|
||||
|
||||
for categoria in list_canales:
|
||||
include_in_newest = config.get_setting("include_in_newest_" + categoria, channel_id)
|
||||
if include_in_newest:
|
||||
channels_id_name[channel_id] = channel_parameters["title"]
|
||||
list_canales[categoria].append((channel_id, channel_parameters["title"]))
|
||||
any_active = True
|
||||
|
||||
return list_canales
|
||||
return list_canales, any_active
|
||||
|
||||
|
||||
def novedades(item):
|
||||
@@ -142,75 +150,80 @@ def novedades(item):
|
||||
multithread = True
|
||||
|
||||
progreso = platformtools.dialog_progress(item.category, "Buscando canales...")
|
||||
list_canales = get_channels_list()
|
||||
list_canales, any_active = get_channels_list()
|
||||
if any_active and len(list_canales[item.extra])>0:
|
||||
import math
|
||||
# fix float porque la division se hace mal en python 2.x
|
||||
number_of_channels = float(100) / len(list_canales[item.extra])
|
||||
|
||||
import math
|
||||
# fix float porque la division se hace mal en python 2.x
|
||||
number_of_channels = float(100) / len(list_canales[item.extra])
|
||||
for index, channel in enumerate(list_canales[item.extra]):
|
||||
channel_id, channel_title = channel
|
||||
percentage = int(math.ceil((index + 1) * number_of_channels))
|
||||
|
||||
for index, channel in enumerate(list_canales[item.extra]):
|
||||
channel_id, channel_title = channel
|
||||
percentage = int(math.ceil((index + 1) * number_of_channels))
|
||||
# if progreso.iscanceled():
|
||||
# progreso.close()
|
||||
# logger.info("Búsqueda cancelada")
|
||||
# return itemlist
|
||||
|
||||
# if progreso.iscanceled():
|
||||
# progreso.close()
|
||||
# logger.info("Búsqueda cancelada")
|
||||
# return itemlist
|
||||
# Modo Multi Thread
|
||||
if multithread:
|
||||
t = Thread(target=get_newest, args=[channel_id, item.extra], name=channel_title)
|
||||
t.start()
|
||||
threads.append(t)
|
||||
progreso.update(percentage, "", "Buscando en '%s'..." % channel_title)
|
||||
|
||||
# Modo Multi Thread
|
||||
# Modo single Thread
|
||||
else:
|
||||
logger.info("Obteniendo novedades de channel_id=" + channel_id)
|
||||
progreso.update(percentage, "", "Buscando en '%s'..." % channel_title)
|
||||
get_newest(channel_id, item.extra)
|
||||
|
||||
# Modo Multi Thread: esperar q todos los hilos terminen
|
||||
if multithread:
|
||||
t = Thread(target=get_newest, args=[channel_id, item.extra], name=channel_title)
|
||||
t.start()
|
||||
threads.append(t)
|
||||
progreso.update(percentage, "", "Buscando en '%s'..." % channel_title)
|
||||
|
||||
# Modo single Thread
|
||||
else:
|
||||
logger.info("Obteniendo novedades de channel_id=" + channel_id)
|
||||
progreso.update(percentage, "", "Buscando en '%s'..." % channel_title)
|
||||
get_newest(channel_id, item.extra)
|
||||
|
||||
# Modo Multi Thread: esperar q todos los hilos terminen
|
||||
if multithread:
|
||||
pendent = [a for a in threads if a.isAlive()]
|
||||
t = float(100) / len(pendent)
|
||||
while pendent:
|
||||
index = (len(threads) - len(pendent)) + 1
|
||||
percentage = int(math.ceil(index * t))
|
||||
|
||||
list_pendent_names = [a.getName() for a in pendent]
|
||||
mensaje = "Buscando en %s" % (", ".join(list_pendent_names))
|
||||
progreso.update(percentage, "Finalizado en %d/%d canales..." % (len(threads) - len(pendent), len(threads)),
|
||||
mensaje)
|
||||
logger.debug(mensaje)
|
||||
|
||||
if progreso.iscanceled():
|
||||
logger.info("Busqueda de novedades cancelada")
|
||||
break
|
||||
|
||||
time.sleep(0.5)
|
||||
pendent = [a for a in threads if a.isAlive()]
|
||||
t = float(100) / len(pendent)
|
||||
while pendent:
|
||||
index = (len(threads) - len(pendent)) + 1
|
||||
percentage = int(math.ceil(index * t))
|
||||
|
||||
mensaje = "Resultados obtenidos: %s | Tiempo: %2.f segundos" % (len(list_newest), time.time() - start_time)
|
||||
progreso.update(100, mensaje, " ", " ")
|
||||
logger.info(mensaje)
|
||||
start_time = time.time()
|
||||
# logger.debug(start_time)
|
||||
list_pendent_names = [a.getName() for a in pendent]
|
||||
mensaje = "Buscando en %s" % (", ".join(list_pendent_names))
|
||||
progreso.update(percentage, "Finalizado en %d/%d canales..." % (len(threads) - len(pendent), len(threads)),
|
||||
mensaje)
|
||||
logger.debug(mensaje)
|
||||
|
||||
result_mode = config.get_setting("result_mode", "news")
|
||||
if result_mode == 0: # Agrupados por contenido
|
||||
ret = group_by_content(list_newest)
|
||||
elif result_mode == 1: # Agrupados por canales
|
||||
ret = group_by_channel(list_newest)
|
||||
else: # Sin agrupar
|
||||
ret = no_group(list_newest)
|
||||
if progreso.iscanceled():
|
||||
logger.info("Busqueda de novedades cancelada")
|
||||
break
|
||||
|
||||
while time.time() - start_time < 2:
|
||||
# mostrar cuadro de progreso con el tiempo empleado durante almenos 2 segundos
|
||||
time.sleep(0.5)
|
||||
time.sleep(0.5)
|
||||
pendent = [a for a in threads if a.isAlive()]
|
||||
|
||||
progreso.close()
|
||||
return ret
|
||||
mensaje = "Resultados obtenidos: %s | Tiempo: %2.f segundos" % (len(list_newest), time.time() - start_time)
|
||||
progreso.update(100, mensaje, " ", " ")
|
||||
logger.info(mensaje)
|
||||
start_time = time.time()
|
||||
# logger.debug(start_time)
|
||||
|
||||
result_mode = config.get_setting("result_mode", "news")
|
||||
if result_mode == 0: # Agrupados por contenido
|
||||
ret = group_by_content(list_newest)
|
||||
elif result_mode == 1: # Agrupados por canales
|
||||
ret = group_by_channel(list_newest)
|
||||
else: # Sin agrupar
|
||||
ret = no_group(list_newest)
|
||||
|
||||
while time.time() - start_time < 2:
|
||||
# mostrar cuadro de progreso con el tiempo empleado durante almenos 2 segundos
|
||||
time.sleep(0.5)
|
||||
|
||||
progreso.close()
|
||||
return ret
|
||||
else:
|
||||
no_channels = platformtools.dialog_ok('Novedades - %s'%item.extra, 'No se ha definido ningun canal para la '
|
||||
'busqueda.','Utilice el menu contextual '
|
||||
'para agregar al menos uno')
|
||||
return
|
||||
|
||||
|
||||
def get_newest(channel_id, categoria):
|
||||
@@ -457,10 +470,35 @@ def setting_channel(item):
|
||||
list_controls.append(control)
|
||||
|
||||
caption = "Canales incluidos en Novedades " + item.title.replace("Canales incluidos en: ", "- ").strip()
|
||||
return platformtools.show_channel_settings(list_controls=list_controls, callback="save_settings", item=item,
|
||||
caption=caption, custom_button={"visible": False})
|
||||
if config.get_setting("custom_button_value_news", item.channel):
|
||||
custom_button_label = "Ninguno"
|
||||
else:
|
||||
custom_button_label = "Todos"
|
||||
|
||||
return platformtools.show_channel_settings(list_controls=list_controls,
|
||||
caption="Canales incluidos en Novedades",
|
||||
callback="save_settings", item=item,
|
||||
custom_button={'visible': True,
|
||||
'function': "cb_custom_button",
|
||||
'close': False,
|
||||
'label': custom_button_label})
|
||||
|
||||
|
||||
def save_settings(item, dict_values):
|
||||
for v in dict_values:
|
||||
config.set_setting("include_in_newest_" + item.extra, dict_values[v], v)
|
||||
|
||||
|
||||
def cb_custom_button(item, dict_values):
|
||||
value = config.get_setting("custom_button_value_news", item.channel)
|
||||
if value == "":
|
||||
value = False
|
||||
|
||||
for v in dict_values.keys():
|
||||
dict_values[v] = not value
|
||||
|
||||
if config.set_setting("custom_button_value_news", not value, item.channel) == True:
|
||||
return {"label": "Ninguno"}
|
||||
else:
|
||||
return {"label": "Todos"}
|
||||
|
||||
|
||||
@@ -67,6 +67,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -222,6 +222,8 @@ def newest(categoria):
|
||||
item.url = host + 'movies/'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + "genre/animacion/"
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "genre/terror/"
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
@@ -46,6 +46,14 @@
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
|
||||
@@ -78,12 +78,14 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.from_newest = True
|
||||
item.action = "entradas"
|
||||
itemlist = entradas(item)
|
||||
elif categoria == "terror":
|
||||
item.url = host+"terror/"
|
||||
item.from_newest = True
|
||||
item.action = "entradas"
|
||||
itemlist = entradas(item)
|
||||
|
||||
if itemlist[-1].action == "entradas":
|
||||
itemlist.pop()
|
||||
if itemlist[-1].action == "entradas":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
|
||||
@@ -49,6 +49,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -293,11 +293,12 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + '/estrenos/'
|
||||
item.extra = 'peliculas'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'http://pelisfox.tv/peliculas/animacion/'
|
||||
item.extra = 'peliculas'
|
||||
itemlist = todas(item)
|
||||
item.url = host + '/peliculas/animacion/'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + '/peliculas/terror/'
|
||||
item.extra = 'peliculas'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
except:
|
||||
|
||||
@@ -40,6 +40,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -254,6 +254,8 @@ def newest(categoria):
|
||||
item.url = host + 'estrenos'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + 'animacion'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'terror'
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == 'Siguiente >>>':
|
||||
itemlist.pop()
|
||||
|
||||
@@ -60,6 +60,14 @@
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -140,6 +140,8 @@ def newest(categoria):
|
||||
item.url = host
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + "genero/animacion-e-infantil/"
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "genero/terror/"
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
@@ -71,14 +71,6 @@
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
|
||||
@@ -259,7 +259,15 @@ def findvideos(item):
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url,
|
||||
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
|
||||
quality=scrapedquality, server=server))
|
||||
|
||||
if itemlist:
|
||||
itemlist.append(Item(channel=item.channel))
|
||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer",
|
||||
text_color="magenta"))
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir pelicula a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -391,4 +399,4 @@ def decode(string):
|
||||
|
||||
output = output.decode('utf8')
|
||||
|
||||
return output
|
||||
return output
|
||||
|
||||
@@ -28,6 +28,30 @@
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -141,3 +141,30 @@ def play(item):
|
||||
server=enlaces[0][2], thumbnail=thumbnail, folder=False))
|
||||
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + '/cartelera/'
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + "/online/animacion"
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "/online/terror/"
|
||||
else:
|
||||
return []
|
||||
|
||||
itemlist = lista(item)
|
||||
if itemlist[-1].title == "» Siguiente »":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -28,6 +28,22 @@
|
||||
"label": "Incluir en busqueda global",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,6 +10,7 @@ from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = 'http://vepelis.com/'
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
@@ -250,3 +251,29 @@ def search(item, texto):
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + 'ultimas-peliculas'
|
||||
itemlist = listarpeliculas(item)
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "categoria-terror/"
|
||||
itemlist = listado2(item)
|
||||
else:
|
||||
return []
|
||||
|
||||
if itemlist[-1].title == "!Pagina Siguiente ->":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -23,21 +23,37 @@
|
||||
"direct"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"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_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -198,3 +198,28 @@ def play(item):
|
||||
))
|
||||
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host + '/ver/'
|
||||
elif categoria == 'terror':
|
||||
item.url = host + "/categoria/de-terror.htm"
|
||||
else:
|
||||
return []
|
||||
|
||||
itemlist = scraper(item)
|
||||
if itemlist[-1].title == "» Siguiente »":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -70,6 +70,14 @@
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ def newest(categoria):
|
||||
item.url = HOST
|
||||
elif categoria == 'infantiles':
|
||||
item.url = HOST + "/genre/16/"
|
||||
elif categoria == 'terror':
|
||||
item.url = HOST + "/genre/27/"
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
@@ -27,6 +27,30 @@
|
||||
"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_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -123,7 +123,8 @@ def findvideos(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
language = ''
|
||||
quality = ''
|
||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||
data = re.sub(r""", '"', data)
|
||||
data = re.sub(r"<", '<', data)
|
||||
@@ -134,7 +135,9 @@ def findvideos(item):
|
||||
if len(titles) == len(urls):
|
||||
for i in range(0, len(titles)):
|
||||
if i > 0:
|
||||
title = "Online %s " % titles[i].strip()
|
||||
logger.debug('titles: %s' % titles[i].strip())
|
||||
language, quality = titles[i].split(' - ')
|
||||
title = "%s" % titles[i].strip()
|
||||
else:
|
||||
title = titles[0]
|
||||
|
||||
@@ -143,8 +146,11 @@ def findvideos(item):
|
||||
.headers.get("location", "")
|
||||
videourl = servertools.findvideos(urls[i])
|
||||
if len(videourl) > 0:
|
||||
server = videourl[0][0].capitalize()
|
||||
title = '%s %s' % (server, title)
|
||||
itemlist.append(Item(channel=item.channel, action="play", title=title, url=videourl[0][1],
|
||||
server=videourl[0][0], thumbnail=videourl[0][3], fulltitle=item.title))
|
||||
server=server, thumbnail=videourl[0][3], fulltitle=item.title,
|
||||
language=language, quality=quality ))
|
||||
|
||||
pattern = '<a[^>]+href="([^"]+)"[^<]+</a></td><td><span><img[^>]+>(.*?)</span></td><td><span><img[^>]+>(.*?)' \
|
||||
'</span></td><td><span>(.*?)</span>'
|
||||
@@ -157,3 +163,30 @@ def findvideos(item):
|
||||
fulltitle=item.title, thumbnail=get_thumb("channels_torrent.png")))
|
||||
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = HOST
|
||||
elif categoria == 'infantiles':
|
||||
item.url = HOST + "/animacion"
|
||||
elif categoria == 'terror':
|
||||
item.url = HOST + "/terror/"
|
||||
else:
|
||||
return []
|
||||
|
||||
itemlist = listado(item)
|
||||
if itemlist[-1].title == ">> Página siguiente":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Reference in New Issue
Block a user