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.0" provider-name="Alfa Addon">
|
||||
<addon id="plugin.video.alfa" name="Alfa" version="2.1.1" provider-name="Alfa Addon">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
<import addon="script.module.libtorrent" optional="true"/>
|
||||
@@ -19,11 +19,16 @@
|
||||
</assets>
|
||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||
» canalpelis » hdfull
|
||||
» xdvideos » playmax
|
||||
» cinetux » gnula
|
||||
» flashx » rapidvideo
|
||||
» canalpelis » allcalidad
|
||||
» cinefox » cineasiaenlinea
|
||||
» cinetux » divxatope
|
||||
» maxipelis » pedropolis
|
||||
» doomtv » animeshd
|
||||
» hdfull » ultrapelishd
|
||||
» pelisplus » cinecalidad
|
||||
» peliculasnu » allpeliculas
|
||||
¤ 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>
|
||||
|
||||
@@ -6,8 +6,9 @@ import urllib
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import logger, config
|
||||
|
||||
tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
||||
"Drama": "https://s16.postimg.org/94sia332d/drama.png",
|
||||
@@ -110,7 +111,7 @@ def lista(item):
|
||||
url=next_page_url,
|
||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -157,29 +158,16 @@ def episodios(item):
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
patron = '<li id=epi-.*? class=list-group-item ><a href=(.*?) class=badge.*?width=25 title=(.*?)> <\/span>(.*?)<\/li>'
|
||||
patron = '<li id=epi-.*? class=list-group-item ><a href=(.*?) class=badge.*?width=25 title=(.*?)> <\/span>(.*?) (\d+)<\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedlang, scrapedtitle in matches:
|
||||
for scrapedurl, scrapedlang, scrapedtitle, episode in matches:
|
||||
language = scrapedlang
|
||||
title = scrapedtitle
|
||||
title = scrapedtitle + " " + "1x" + episode
|
||||
url = scrapedurl
|
||||
itemlist.append(item.clone(title=title, url=url, action='findvideos', language=language))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = get_source(item.url)
|
||||
itemlist.extend(servertools.find_video_items(data=data))
|
||||
|
||||
for videoitem in itemlist:
|
||||
title = item.title
|
||||
videoitem.channel = item.channel
|
||||
videoitem.title = title
|
||||
videoitem.action = 'play'
|
||||
|
||||
|
||||
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir serie a la biblioteca", url=item.url, action="add_serie_to_library", extra="episodios", fanart=item.thumbnail, thumbnail=item.thumbnail, contentTitle=item.show, show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -298,7 +298,7 @@ def findvideos(item):
|
||||
|
||||
if server_id in server_url:
|
||||
server = server_id.lower()
|
||||
thumbnail = item.contentThumbnail
|
||||
thumbnail = item.thumbnail
|
||||
if server_id == 'TVM':
|
||||
server = 'thevideo.me'
|
||||
url = server_url[server_id] + video_id + '.html'
|
||||
@@ -367,7 +367,7 @@ def play(item):
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.fulltitle
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.contentThumbnail
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
else:
|
||||
itemlist.append(item)
|
||||
|
||||
@@ -99,10 +99,10 @@ def peliculas(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", data)
|
||||
|
||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title
|
||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title
|
||||
patron += '<div class="rating"><span class="[^"]+"></span>([^<]+).*?' # rating
|
||||
patron += '<span class="quality">([^<]+)</span><a href="([^"]+)">.*?' # calidad, url
|
||||
patron += '<span>([^<]+)</span>' # year
|
||||
patron += '<span>([^<]+)</span>' # year
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
@@ -271,7 +271,7 @@ def series(item):
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
# logger.info(data)
|
||||
|
||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?<a href="([^"]+)">'
|
||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?<a href="([^"]+)">' # img, title, url
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
@@ -323,8 +323,8 @@ def temporadas(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
# logger.info(data)
|
||||
patron = '<span class="title">([^<]+)<i>.*?' # numeros de temporadas
|
||||
patron += '<img src="([^"]+)"></a></div>' # capítulos
|
||||
patron = '<span class="title">([^<]+)<i>.*?' # season
|
||||
patron += '<img src="([^"]+)"></a></div>' # img
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
if len(matches) > 1:
|
||||
@@ -365,9 +365,9 @@ def episodios(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
# logger.info(data)
|
||||
patron = '<div class="imagen"><a href="([^"]+)">.*?' # url cap, img
|
||||
patron += '<div class="numerando">(.*?)</div>.*?' # numerando cap
|
||||
patron += '<a href="[^"]+">([^<]+)</a>' # title de episodios
|
||||
patron = '<div class="imagen"><a href="([^"]+)">.*?' # url
|
||||
patron += '<div class="numerando">(.*?)</div>.*?' # numerando cap
|
||||
patron += '<a href="[^"]+">([^<]+)</a>' # title de episodios
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
@@ -390,7 +390,6 @@ def episodios(item):
|
||||
new_item.infoLabels['episode'] = episode.zfill(2)
|
||||
|
||||
itemlist.append(new_item)
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
# TODO no hacer esto si estamos añadiendo a la videoteca
|
||||
if not item.extra:
|
||||
@@ -407,6 +406,8 @@ def episodios(item):
|
||||
itemlist.sort(key=lambda it: int(it.infoLabels['episode']),
|
||||
reverse=config.get_setting('orden_episodios', __channel__))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
# Opción "Añadir esta serie a la videoteca"
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url,
|
||||
@@ -427,12 +428,13 @@ def findvideos(item):
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for option, url in matches:
|
||||
lang = scrapertools.find_single_match(data, '<li><a class="options" href="#option-%s">.*?<img '
|
||||
'src="http://pedropolis.com/wp-content/themes/dooplay/assets/img'
|
||||
'/flags/(\w+)' % option)
|
||||
idioma = {'mx': '[COLOR cornflowerblue](LAT)[/COLOR]', 'pe': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
||||
'co': '[COLOR cornflowerblue](LAT)[/COLOR]', 'es': '[COLOR green](CAST)[/COLOR]',
|
||||
'en': '[COLOR red](VOS)[/COLOR]', 'jp': '[COLOR green](VOS)[/COLOR]'}
|
||||
lang = scrapertools.find_single_match(data, '<li><a class="options" href="#option-%s">.*?</b>-->(\w+)' % option)
|
||||
lang = lang.lower()
|
||||
idioma = {'latino': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
||||
'drive': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
||||
'castellano': '[COLOR green](CAST)[/COLOR]',
|
||||
'subtitulado': '[COLOR red](VOS)[/COLOR]',
|
||||
'ingles': '[COLOR red](VOS)[/COLOR]'}
|
||||
if lang in idioma:
|
||||
lang = idioma[lang]
|
||||
|
||||
@@ -455,10 +457,8 @@ def findvideos(item):
|
||||
x.server.title(), x.quality, x.language)
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'serie':
|
||||
itemlist.append(Item(channel=__channel__,
|
||||
itemlist.append(Item(channel=__channel__, url=item.url, action="add_pelicula_to_library", extra="findvideos",
|
||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||
url=item.url, action="add_pelicula_to_library",
|
||||
thumbnail=get_thumb("videolibrary_movie.png"),
|
||||
extra="findvideos", contentTitle=item.contentTitle))
|
||||
thumbnail=get_thumb("videolibrary_movie.png"), contentTitle=item.contentTitle))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -470,7 +470,7 @@ def findvideos(item):
|
||||
videoitem.quality = 'default'
|
||||
videoitem.language = 'Latino'
|
||||
if videoitem.server != '':
|
||||
videoitem.thumbnail = item.contentThumbnail
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
else:
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.server = 'directo'
|
||||
|
||||
@@ -217,7 +217,7 @@ def findvideos(item):
|
||||
for videoitem in itemlist:
|
||||
videoitem.channel = item.channel
|
||||
videoitem.action = 'play'
|
||||
videoitem.thumbnail = servertools.guess_server_thumbnail(videoitem.server)
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.infoLabels = item.infoLabels
|
||||
videoitem.title = item.contentTitle + ' (' + videoitem.server + ')'
|
||||
if 'youtube' in videoitem.url:
|
||||
|
||||
Reference in New Issue
Block a user