Merge pull request #246 from Alfa-beto/Fixes

correcciones
This commit is contained in:
Alfa
2018-04-11 16:34:21 -05:00
committed by GitHub
3 changed files with 23 additions and 8 deletions

15
plugin.video.alfa/channels/animeflv_me.py Executable file → Normal file
View File

@@ -213,7 +213,7 @@ def series(item):
context.extend(context2)
for show in show_list:
title, url, thumbnail, plot = show
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, contentSerieName=title,
plot=plot, show=title, viewmode="movies_with_plot", context=context))
url_next_page = scrapertools.find_single_match(page_html, REGEX_NEXT_PAGE)
@@ -237,21 +237,26 @@ def episodios(item):
es_pelicula = False
for url, title, date in episodes:
episode = scrapertools.find_single_match(title, r'Episodio (\d+)')
new_item=itemlist.append(Item(channel=item.channel, action="findvideos",
url=url, thumbnail=item.thumbnail, plot=plot, show=item.show))
# El enlace pertenece a un episodio
if episode:
season = 1
episode = int(episode)
season, episode = renumbertools.numbered_for_tratk(
item.channel, item.show, season, episode)
item.channel, item.contentSerieName, season, episode)
new_item.infoLabels["episode"] = episode
new_item.infoLabels["season"] = season
new_item.contentSerieName = item.contentSerieName
title = "%sx%s %s (%s)" % (season, str(episode).zfill(2), "Episodio %s" % episode, date)
# El enlace pertenece a una pelicula
else:
title = "%s (%s)" % (title, date)
item.url = url
es_pelicula = True
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=item.thumbnail,
plot=plot, show=item.show, fulltitle="%s %s" % (item.show, title)))
new_item.title=title
new_item.fulltitle="%s %s" % (item.show, title)
itemlist.append(new_item)
# El sistema soporta la videoteca y se encontro por lo menos un episodio
# o pelicula

View File

@@ -121,8 +121,8 @@ def episodios(item):
data_lista = scrapertools.find_single_match(data,
'<ul class="episodios">(.+?)<\/ul><\/div><\/div><\/div>')
show = item.title
patron_caps = '<img alt=".+?" title=".+?" src="([^"]+)">'
patron_caps += '<\/a><\/div><div class=".+?">([^"]+)<\/div>.+?<a .+? href="([^"]+)">([^"]+)<\/a>'
patron_caps = '<img alt=".+?" src="([^"]+)"><\/a><\/div><div class=".+?">([^"]+)<\/div>.+?'
patron_caps += '<a .+? href="([^"]+)">([^"]+)<\/a>'
#scrapedthumbnail,#scrapedtempepi, #scrapedurl, #scrapedtitle
matches = scrapertools.find_multiple_matches(data_lista, patron_caps)
for scrapedthumbnail, scrapedtempepi, scrapedurl, scrapedtitle in matches:

View File

@@ -324,7 +324,9 @@ def title_format(item):
# Si el titulo no tiene contentSerieName entonces se formatea como pelicula
item.title = '%s' % set_color(item.contentTitle, 'movie')
if item.contentType=='movie':
item.context='Buscar esta pelicula en otros canales'
if item.context:
if isinstance(item.context, list):
item.context.append('Buscar esta pelicula en otros canales')
if 'Novedades' in item.category and item.from_channel=='news':
#logger.debug('novedades')
@@ -406,6 +408,7 @@ def title_format(item):
if 'Activar' in item.context[1]['title']:
item.title= '%s' % (set_color(item.title, 'no_update'))
#logger.debug('Despues del formato: %s' % item)
# Damos formato al servidor si existiera
if item.server:
server = '%s' % set_color(item.server.strip().capitalize(), 'server')
@@ -417,6 +420,7 @@ def title_format(item):
if item.action != 'play' and item.server:
item.title ='%s %s'%(item.title, server.strip())
elif item.action == 'play' and item.server:
if item.quality == 'default':
quality = ''
#logger.debug('language_color: %s'%language_color)
@@ -424,6 +428,12 @@ def title_format(item):
if lang:
item.title = add_languages(item.title, simple_language)
#logger.debug('item.title: %s' % item.title)
# si hay verificacion de enlaces
if item.alive != '':
if item.alive.lower() == 'no':
item.title = '[[COLOR red][B]X[/B][/COLOR]] %s' % item.title
elif item.alive == '??':
item.title = '[[COLOR yellow][B]?[/B][/COLOR]] %s' % item.title
else:
item.title = '%s' % item.title
#logger.debug('item.title despues de server: %s' % item.title)