@@ -28,14 +28,6 @@
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": 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_series",
|
"id": "include_in_newest_series",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
@@ -43,6 +35,24 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "filter_languages",
|
||||||
|
"type": "list",
|
||||||
|
"label": "Mostrar enlaces en idioma...",
|
||||||
|
"default": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true,
|
||||||
|
"lvalues": [
|
||||||
|
"No filtrar",
|
||||||
|
"Español",
|
||||||
|
"Inglés",
|
||||||
|
"Latino",
|
||||||
|
"VO",
|
||||||
|
"VOS",
|
||||||
|
"VOSI",
|
||||||
|
"OVOS"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -13,45 +13,59 @@ from core import servertools
|
|||||||
from core import tmdb
|
from core import tmdb
|
||||||
from core.item import Item, InfoLabels
|
from core.item import Item, InfoLabels
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
from channels import filtertools
|
||||||
|
|
||||||
|
host = "https://pepecine.io"
|
||||||
|
|
||||||
|
IDIOMAS = {'es': 'Español', 'en': 'Inglés', 'la': 'Latino', 'su': 'VOSE', 'vo': 'VO', 'otro': 'OVOS'}
|
||||||
|
list_idiomas = IDIOMAS.values()
|
||||||
|
list_language = ['default']
|
||||||
|
|
||||||
host = "https://pepecinehd.tv"
|
|
||||||
perpage = 20
|
perpage = 20
|
||||||
|
|
||||||
def mainlist1(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Películas", action='movies_menu'))
|
|
||||||
#itemlist.append(item.clone(title="Series", action='tvshows_menu'))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(title = "Películas"))
|
||||||
title="Ultimas",
|
|
||||||
url=host+'/tv-peliculas-online',
|
itemlist.append(item.clone(
|
||||||
action='list_latest',
|
title = " Últimas películas",
|
||||||
indexp=1,
|
url = host + '/las-peliculas-online',
|
||||||
type='movie'))
|
action = 'list_latest',
|
||||||
itemlist.append(Item(channel=item.channel,
|
type = 'movie'))
|
||||||
title="Todas",
|
|
||||||
url= host+'/ver-online',
|
itemlist.append(item.clone(title = " Películas por género",
|
||||||
action='list_all',
|
url = host + '/ver-pelicula',
|
||||||
page='1',
|
action = 'genero',
|
||||||
type='movie'))
|
type = 'movie'))
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
title="Género",
|
itemlist.append(item.clone(title = " Todas las películas",
|
||||||
url= host,
|
url = host + '/ver-pelicula',
|
||||||
action='genero',
|
action = 'list_all',
|
||||||
page='1',
|
type = 'movie'))
|
||||||
type='movie'))
|
|
||||||
itemlist.append(Item(channel=item.channel, title = "", action =""))
|
itemlist.append(Item(title = "Series"))
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
title="Buscar",
|
itemlist.append(item.clone(title = " Últimas series",
|
||||||
url= host+'/esta-online?q=',
|
url = host + '/las-series-online',
|
||||||
action='search',
|
action = 'list_latest',
|
||||||
page='1',
|
type = 'series'))
|
||||||
type='movie'))
|
|
||||||
|
itemlist.append(item.clone(title = " Series por género",
|
||||||
|
url = host + '/ver-serie-tv',
|
||||||
|
action = 'genero',
|
||||||
|
type = 'series'))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title = " Todas las series",
|
||||||
|
url = host + '/ver-serie-tv',
|
||||||
|
action ='list_all',
|
||||||
|
type = 'series'))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title = "Buscar",
|
||||||
|
url = host + '/donde-ver?q=',
|
||||||
|
action ='search',
|
||||||
|
type = 'movie'))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -59,40 +73,25 @@ def genero(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist=[]
|
itemlist=[]
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = data.replace("\n","")
|
patron = '<a href="(\?genre[^"]+)"[^>]*>[^>]+>(.+?)</li>'
|
||||||
bloque = scrapertools.find_single_match(data, 'Peliculas</h2><div id="SlideMenu1" class="s2">.*?SlideMenu1_Folder">.*?</ul></li>')
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
patron = '<a href="([^"]+).*?'
|
|
||||||
patron += '<li>([^<]+)'
|
|
||||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
itemlist.append(Item(action = "list_all",
|
itemlist.append(item.clone(action = "list_all",
|
||||||
channel = item.channel,
|
title = scrapedtitle,
|
||||||
page='1',
|
url = item.url + scrapedurl
|
||||||
title = scrapedtitle,
|
))
|
||||||
type= item.type,
|
|
||||||
url = host + scrapedurl
|
|
||||||
))
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
def newest(categoria):
|
||||||
|
logger.info("categoria: %s" % categoria)
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
def tvshows_menu(item):
|
if categoria == 'peliculas':
|
||||||
logger.info()
|
itemlist = list_latest(Item(url = host + '/las-peliculas-online',
|
||||||
itemlist=[]
|
type = 'movie'))
|
||||||
itemlist.append(Item(channel=item.channel,
|
elif categoria == 'series':
|
||||||
title="Ultimas",
|
itemlist = list_latest(Item(url = host + '/las-series-online',
|
||||||
url=host+'/ver-tv-serie-online',
|
type = 'series'))
|
||||||
action='list_latest',
|
|
||||||
type='serie'))
|
|
||||||
itemlist.append(item.clone(title="Todas",
|
|
||||||
url=host + '/serie-tv',
|
|
||||||
action='list_all',
|
|
||||||
page='1',
|
|
||||||
type='series'))
|
|
||||||
itemlist.append(item.clone(title="Buscar",
|
|
||||||
url= host+'/esta-online?q=',
|
|
||||||
action='search',
|
|
||||||
page='1',
|
|
||||||
type='series'))
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -101,43 +100,41 @@ def search(item, texto):
|
|||||||
texto = texto.replace(" ", "+")
|
texto = texto.replace(" ", "+")
|
||||||
item.url = item.url + texto
|
item.url = item.url + texto
|
||||||
item.extra = "busca"
|
item.extra = "busca"
|
||||||
if texto != '':
|
if texto == '':
|
||||||
return sub_search(item)
|
|
||||||
else:
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
return sub_search(item)
|
||||||
|
|
||||||
|
def search_section(item, data, sectionType):
|
||||||
|
logger.info()
|
||||||
|
sectionResultsRE = re.findall("<a[^<]+href *= *[\"'](?P<url>[^\"']+)[^>]>[^<]*<img[^>]+src *= *[\"'](?P<thumbnail>[^\"']+).*?<figcaption[^\"']*[\"'](?P<title>.*?)\">", data, re.MULTILINE | re.DOTALL)
|
||||||
|
|
||||||
|
itemlist = []
|
||||||
|
for url, thumbnail, title in sectionResultsRE:
|
||||||
|
newitem = item.clone(action = "seasons" if sectionType == "series" else "findvideos",
|
||||||
|
title = title,
|
||||||
|
thumbnail = thumbnail,
|
||||||
|
url = url)
|
||||||
|
if sectionType == "series":
|
||||||
|
newitem.show = title;
|
||||||
|
itemlist.append(newitem)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
def sub_search(item):
|
def sub_search(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
f1 = "Peliculas"
|
|
||||||
action = "findvideos"
|
searchSections = re.findall("<div[^>]+id *= *[\"'](?:movies|series)[\"'].*?</div>", data, re.MULTILINE | re.DOTALL)
|
||||||
if item.type == "series":
|
|
||||||
action = "list_all"
|
logger.info("Search sections = {0}".format(len(searchSections)))
|
||||||
f1 = "Series"
|
itemlist.extend(search_section(item, searchSections[0], "movies"))
|
||||||
patron = 'Ver %s .*?id="%s' %(f1, item.type)
|
itemlist.extend(search_section(item, searchSections[1], "series"))
|
||||||
bloque = scrapertools.find_single_match(data, patron)
|
|
||||||
patron = 'col-sm-4 pretty-figure">\s*<a href="([^"]+).*?'
|
|
||||||
patron += 'src="([^"]+).*?'
|
|
||||||
patron += 'title="([^"]+).*?'
|
|
||||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
|
||||||
path = scrapertools.find_single_match(scrapedthumbnail, "w\w+(/\w+.....)")
|
|
||||||
filtro_list = {"poster_path": path}
|
|
||||||
filtro_list = filtro_list.items()
|
|
||||||
itemlist.append(item.clone(action = "findvideos",
|
|
||||||
extra = "one",
|
|
||||||
infoLabels={'filtro': filtro_list},
|
|
||||||
thumbnail = scrapedthumbnail,
|
|
||||||
title = scrapedtitle,
|
|
||||||
fulltitle = scrapedtitle,
|
|
||||||
url = scrapedurl
|
|
||||||
))
|
|
||||||
tmdb.set_infoLabels(itemlist)
|
tmdb.set_infoLabels(itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def get_source(url):
|
def get_source(url):
|
||||||
logger.info()
|
logger.info()
|
||||||
data = httptools.downloadpage(url).data
|
data = httptools.downloadpage(url).data
|
||||||
@@ -147,6 +144,10 @@ def get_source(url):
|
|||||||
|
|
||||||
def list_latest(item):
|
def list_latest(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
|
if not item.indexp:
|
||||||
|
item.indexp = 1
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = get_source(item.url)
|
data = get_source(item.url)
|
||||||
data_url= scrapertools.find_single_match(data,'<iframe.*?src=(.*?) ')
|
data_url= scrapertools.find_single_match(data,'<iframe.*?src=(.*?) ')
|
||||||
@@ -156,108 +157,209 @@ def list_latest(item):
|
|||||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||||
count = 0
|
count = 0
|
||||||
for thumbnail, title, url, language in matches:
|
for thumbnail, title, url, language in matches:
|
||||||
count +=1
|
count += 1
|
||||||
if count >= item.indexp and count < item.indexp + perpage:
|
|
||||||
path = scrapertools.find_single_match(thumbnail, "w\w+(/\w+.....)")
|
|
||||||
filtro_list = {"poster_path": path}
|
|
||||||
filtro_list = filtro_list.items()
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
title=title,
|
|
||||||
fulltitle=title,
|
|
||||||
contentTitle=title,
|
|
||||||
url=host+url,
|
|
||||||
thumbnail=thumbnail,
|
|
||||||
language=language,
|
|
||||||
infoLabels={'filtro': filtro_list},
|
|
||||||
extra="one",
|
|
||||||
action='findvideos'))
|
|
||||||
tmdb.set_infoLabels(itemlist)
|
|
||||||
item.indexp += perpage
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
title="Siguiente >>",
|
|
||||||
url=item.url,
|
|
||||||
extra="one",
|
|
||||||
indexp=item.indexp,
|
|
||||||
action='list_latest'))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
if count < item.indexp:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if count >= item.indexp + perpage:
|
||||||
|
break;
|
||||||
|
|
||||||
|
path = scrapertools.find_single_match(thumbnail, "w\w+(/\w+.....)")
|
||||||
|
filtro_list = {"poster_path": path}
|
||||||
|
filtro_list = filtro_list.items()
|
||||||
|
itemlist.append(item.clone(action = 'findvideos',
|
||||||
|
title = title,
|
||||||
|
url = host + url,
|
||||||
|
thumbnail = thumbnail,
|
||||||
|
language = language,
|
||||||
|
infoLabels = {'filtro': filtro_list},
|
||||||
|
)
|
||||||
|
)
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
|
|
||||||
|
# Desde novedades no tenemos el elemento item.channel
|
||||||
|
if item.channel:
|
||||||
|
itemlist.append(item.clone(title = "Página siguiente >>>",
|
||||||
|
indexp = item.indexp + perpage
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if item.indexp > 1:
|
||||||
|
itemlist.append(item.clone(title = "<<< Página anterior",
|
||||||
|
indexp = item.indexp - perpage
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
def list_all(item):
|
def list_all(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist=[]
|
itemlist=[]
|
||||||
|
|
||||||
|
if not item.page:
|
||||||
|
item.page = 1
|
||||||
|
|
||||||
genero = scrapertools.find_single_match(item.url, "genre=(\w+)")
|
genero = scrapertools.find_single_match(item.url, "genre=(\w+)")
|
||||||
data= get_source(item.url)
|
data= get_source(item.url)
|
||||||
token = scrapertools.find_single_match(data, "token:.*?'(.*?)'")
|
token = scrapertools.find_single_match(data, "token:.*?'(.*?)'")
|
||||||
url = host+'/titles/paginate?_token=%s&perPage=24&page=%s&order=mc_num_of_votesDesc&type=%s&minRating=&maxRating=&availToStream=1&genres[]=%s' % (token, item.page, item.type, genero)
|
url = host+'/titles/paginate?_token=%s&perPage=%d&page=%d&order=mc_num_of_votesDesc&type=%s&minRating=&maxRating=&availToStream=1&genres[]=%s' % (token, perpage, item.page, item.type, genero)
|
||||||
data = httptools.downloadpage(url).data
|
data = httptools.downloadpage(url).data
|
||||||
|
|
||||||
|
if item.type == "series":
|
||||||
|
# Remove links to speed-up (a lot!) json load
|
||||||
|
data = re.sub(",? *[\"']link[\"'] *: *\[.+?\] *([,}])", "\g<1>", data)
|
||||||
|
|
||||||
dict_data = jsontools.load(data)
|
dict_data = jsontools.load(data)
|
||||||
items = dict_data['items']
|
items = dict_data['items']
|
||||||
for dict in items:
|
|
||||||
new_item = Item(channel=item.channel,
|
for element in items:
|
||||||
title=dict['title']+' [%s]' % dict['year'],
|
new_item = item.clone(
|
||||||
plot = dict['plot'],
|
title = element['title']+' [%s]' % element['year'],
|
||||||
thumbnail=dict['poster'],
|
plot = element['plot'],
|
||||||
url=dict['link'],
|
thumbnail = element['poster'],
|
||||||
infoLabels={'year':dict['year']})
|
infoLabels = {'year':element['year']})
|
||||||
|
|
||||||
|
if "link" in element:
|
||||||
|
new_item.url = element["link"]
|
||||||
|
new_item.extra = "links_encoded"
|
||||||
|
|
||||||
if item.type == 'movie':
|
if item.type == 'movie':
|
||||||
new_item.contentTitle=dict['title']
|
|
||||||
new_item.fulltitle=dict['title']
|
|
||||||
new_item.action = 'findvideos'
|
new_item.action = 'findvideos'
|
||||||
|
new_item.contentTitle = element['title']
|
||||||
|
new_item.fulltitle = element['title']
|
||||||
|
if new_item.extra != "links_encoded":
|
||||||
|
new_item.url = host + "/ver-pelicula/" + str(element['id'])
|
||||||
|
|
||||||
elif item.type == 'series':
|
elif item.type == 'series':
|
||||||
new_item.contentSerieName = dict['title']
|
new_item.action = 'seasons'
|
||||||
new_item.action = ''
|
new_item.url = host + "/ver-serie-tv/" + str(element['id'])
|
||||||
|
new_item.show = element['title']
|
||||||
|
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist)
|
tmdb.set_infoLabels(itemlist)
|
||||||
itemlist.append(item.clone(title='Siguiente>>>',
|
|
||||||
url=item.url,
|
itemlist.append(item.clone(title = 'Página siguiente >>>',
|
||||||
action='list_all',
|
page = item.page + 1))
|
||||||
type= item.type,
|
|
||||||
page=str(int(item.page) + 1)))
|
if (int(item.page) > 1):
|
||||||
|
itemlist.append(item.clone(title = '<<< Página anterior',
|
||||||
|
page = item.page - 1))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
def episodios(item):
|
||||||
|
logger.info("url: %s" % item.url)
|
||||||
|
itemlist = seasons(item)
|
||||||
|
|
||||||
|
if len(itemlist) > 0 and itemlist[0].action != "findvideos":
|
||||||
|
episodes = []
|
||||||
|
for season in itemlist:
|
||||||
|
episodes.extend([episode for episode in seasons_episodes(season)])
|
||||||
|
itemlist = episodes
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def seasons(item):
|
||||||
|
logger.info()
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
|
reSeasons = re.findall("href *= *[\"']([^\"']+)[\"'][^\"']+[\"']sezon[^>]+>([^<]+)+", data)
|
||||||
|
|
||||||
|
itemlist = [item.clone(action = "seasons_episodes",
|
||||||
|
title = title,
|
||||||
|
url = url) for url, title in reSeasons]
|
||||||
|
|
||||||
|
if len(itemlist) == 1:
|
||||||
|
itemlist = seasons_episodes(itemlist[0])
|
||||||
|
|
||||||
|
# Opción "Añadir esta serie a la videoteca de XBMC"
|
||||||
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
|
itemlist.append(item.clone(title="Añadir esta serie a la videoteca", action="add_serie_to_library", extra="episodios"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def seasons_episodes(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
reEpisodes = re.findall("<a[^>]+col-sm-3[^>]+href *= *[\"'](?P<url>[^\"']+).*?<img[^>]+src *= *[\"'](?P<thumbnail>[^\"']+).*?<a[^>]+>(?P<title>.*?)</a>", data, re.MULTILINE | re.DOTALL)
|
||||||
|
|
||||||
|
seasons = [item.clone(action = "findvideos",
|
||||||
|
title = re.sub("<b>Episodio (\d+)</b> - T(\d+) \|[^\|]*\| ".format(item.show), "\g<2>x\g<1> - ", title),
|
||||||
|
thumbnail = thumbnail,
|
||||||
|
url = url) for url, thumbnail, title in reEpisodes]
|
||||||
|
|
||||||
|
return seasons
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist=[]
|
itemlist=[]
|
||||||
if item.extra == "one":
|
|
||||||
|
if item.extra != "links_encoded":
|
||||||
|
|
||||||
|
# data = httptools.downloadpage(item.url).data
|
||||||
|
# linksRE = re.findall("getFavicon\('(?P<url>[^']+)[^>]+>[^>]+>(?P<language>[^<]+).+?<td[^>]+>(?P<quality>[^<]*).+?<td[^>]+>(?P<antiquity>[^<]*)", data, re.MULTILINE | re.DOTALL)
|
||||||
|
# for url, language, quality, antiquity in linksRE:
|
||||||
|
# logger.info("URL = " + url);
|
||||||
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = "renderTab.bind.*?'([^']+).*?"
|
patron = "renderTab.bind.*?'([^']+).*?"
|
||||||
patron += "app.utils.getFavicon.*?<b>(.*?) .*?"
|
patron += "app.utils.getFavicon.*?<img [^>]*src *= *[\"']/([^\.]+).*?"
|
||||||
patron += 'color:#B1FFC5;">([^<]+)'
|
patron += 'color:#B1FFC5;">([^<]+)'
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for scrapedurl, scrapedlanguage, scrapedquality in matches:
|
for scrapedurl, language, scrapedquality in matches:
|
||||||
title = "Ver enlace en %s " + "[" + scrapedlanguage + "]" + "[" + scrapedquality + "]"
|
isDD = language.startswith("z")
|
||||||
if scrapedlanguage != 'zc':
|
if isDD:
|
||||||
itemlist.append(item.clone(action='play',
|
language = language[1:]
|
||||||
title=title,
|
|
||||||
url=scrapedurl,
|
language = language[0:2]
|
||||||
language=scrapedlanguage
|
language = IDIOMAS.get(language, language)
|
||||||
))
|
|
||||||
|
title = ("Ver" if not isDD else "Descargar") + " enlace en %s [" + language + "] [" + scrapedquality + "]"
|
||||||
|
if not isDD:
|
||||||
|
itemlist.append(item.clone(action = 'play',
|
||||||
|
title = title,
|
||||||
|
url = scrapedurl,
|
||||||
|
language = language
|
||||||
|
)
|
||||||
|
)
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
else:
|
else:
|
||||||
for link in item.url:
|
for link in item.url:
|
||||||
language = scrapertools.find_single_match(link['label'], '(.*?) <img')
|
|
||||||
if language != 'zc':
|
language = scrapertools.find_single_match(link['label'], '/([^\.]+)')
|
||||||
|
isDD = language.startswith("z")
|
||||||
|
if isDD:
|
||||||
|
language = language[1:]
|
||||||
|
|
||||||
|
language = language[0:2]
|
||||||
|
|
||||||
|
if not isDD:
|
||||||
itemlist.append(item.clone(action='play',
|
itemlist.append(item.clone(action='play',
|
||||||
title=item.title,
|
title = item.title,
|
||||||
url= link['url'],
|
url= link['url'],
|
||||||
language=language,
|
language=IDIOMAS.get(language, language),
|
||||||
quality=link['quality']))
|
quality=link['quality']))
|
||||||
itemlist=servertools.get_servers_itemlist(itemlist)
|
itemlist=servertools.get_servers_itemlist(itemlist)
|
||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.title = '%s [%s]' % (videoitem.server.capitalize(), videoitem.language.capitalize())
|
videoitem.title = '%s [%s] [%s]' % (videoitem.server.capitalize(), videoitem.language, videoitem.quality)
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist)
|
tmdb.set_infoLabels(itemlist)
|
||||||
if itemlist:
|
if itemlist and not item.show:
|
||||||
itemlist.append(Item(channel = item.channel))
|
itemlist.append(Item(channel = item.channel))
|
||||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||||
text_color="magenta"))
|
text_color="magenta"))
|
||||||
# Opción "Añadir esta película a la videoteca de KODI"
|
# Opción "Añadir esta película a la videoteca de KODI"
|
||||||
if item.extra != "library":
|
if item.extra != "library":
|
||||||
if config.get_videolibrary_support():
|
if config.get_videolibrary_support():
|
||||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
itemlist.append(item.clone(title="Añadir a la videoteca",
|
||||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
text_color="green",
|
||||||
fulltitle = item.fulltitle
|
action="add_pelicula_to_library"
|
||||||
))
|
))
|
||||||
return itemlist
|
return filtertools.get_links(itemlist, item, list_idiomas)
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
def play(item):
|
||||||
|
|||||||
Reference in New Issue
Block a user