From 8dca67daa8ca305a023a511696f6e8127d52d806 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 10 Oct 2017 15:22:14 -0300 Subject: [PATCH] Ajustes a canales varios --- plugin.video.alfa/channels/maxipelis.py | 5 +++-- .../channels/peliculasaudiolatino.py | 2 ++ plugin.video.alfa/channels/peliculasmx.py | 9 +++------ plugin.video.alfa/channels/peliscity.py | 2 +- plugin.video.alfa/channels/repelis.py | 13 +++++++------ plugin.video.alfa/channels/seriesadicto.py | 19 +++++++++++-------- plugin.video.alfa/channels/serieslatino.py | 2 +- plugin.video.alfa/channels/seriesmeme.py | 2 +- plugin.video.alfa/channels/seriesyonkis.py | 8 +++++--- .../channels/verpeliculasnuevas.py | 2 +- 10 files changed, 35 insertions(+), 29 deletions(-) diff --git a/plugin.video.alfa/channels/maxipelis.py b/plugin.video.alfa/channels/maxipelis.py index ce8c7f8d..8f6b07de 100644 --- a/plugin.video.alfa/channels/maxipelis.py +++ b/plugin.video.alfa/channels/maxipelis.py @@ -104,9 +104,10 @@ def peliculas(item): new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle , infoLabels={'year':year} ) - if year: - tmdb.set_infoLabels_item(new_item) + #if year: + # tmdb.set_infoLabels_item(new_item) itemlist.append(new_item) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) try: patron = '' next_page = re.compile(patron,re.DOTALL).findall(data) diff --git a/plugin.video.alfa/channels/peliculasaudiolatino.py b/plugin.video.alfa/channels/peliculasaudiolatino.py index d5a021ac..197cc18c 100644 --- a/plugin.video.alfa/channels/peliculasaudiolatino.py +++ b/plugin.video.alfa/channels/peliculasaudiolatino.py @@ -155,6 +155,8 @@ def findvideos(item): url = scrapedurl server = servertools.get_server_name(servidor) title = "Enlace encontrado en %s" % (server) + if idioma == 'Ingles Subtitulado': + idioma = 'vose' itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url, thumbnail=scrapedthumbnail, language=idioma, quality=calidad, server=server)) if itemlist: diff --git a/plugin.video.alfa/channels/peliculasmx.py b/plugin.video.alfa/channels/peliculasmx.py index 4055fd26..81ccd672 100644 --- a/plugin.video.alfa/channels/peliculasmx.py +++ b/plugin.video.alfa/channels/peliculasmx.py @@ -76,14 +76,11 @@ def peliculas(item): tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) # Extrae la marca de siguiente página - paginador = scrapertools.find_single_match(data, "
.*?lateral") + next_page = scrapertools.find_single_match(data, 'class="nextpostslink" rel="next" href="(.*?)">') - patron = ".*?href='([^']+)" - scrapedurl = scrapertools.find_single_match(paginador, patron) - - if scrapedurl: + if next_page: scrapedtitle = "!Pagina Siguiente ->" - itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl, folder=True)) + itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=next_page, folder=True)) return itemlist diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index fa64ef07..a8b875c6 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -43,7 +43,7 @@ def porIdioma(item): itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas", url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot")) itemlist.append( - Item(channel=item.channel, title="VOS", action="agregadas", url= host + "/idioma/subtitulada/", + Item(channel=item.channel, title="VOSE", action="agregadas", url= host + "/idioma/subtitulada/", viewmode="movie_with_plot")) itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas", url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot")) diff --git a/plugin.video.alfa/channels/repelis.py b/plugin.video.alfa/channels/repelis.py index 67fb5234..c1dd55c9 100644 --- a/plugin.video.alfa/channels/repelis.py +++ b/plugin.video.alfa/channels/repelis.py @@ -108,13 +108,12 @@ def menupelis(item): language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"') # if language = 'ingles': # language='vo' - new_item=Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, + itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality, - infoLabels={'year': year}) - if year: - tmdb.set_infoLabels_item(new_item) + infoLabels={'year': year})) + + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - itemlist.append(new_item) try: next_page = scrapertools.get_match(data, '\d+2> Página siguiente" + try: next_page = scrapertools.get_match(data, '\d+ 0: itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url, @@ -142,18 +143,19 @@ def extrae_idiomas(bloqueidiomas): patronidiomas = '([a-z0-9]+).png"' idiomas = re.compile(patronidiomas, re.DOTALL).findall(bloqueidiomas) textoidiomas = "" + language=[] for idioma in idiomas: if idioma == "1": textoidiomas = textoidiomas + "Español" + "/" if idioma == "2": textoidiomas = textoidiomas + "Latino" + "/" if idioma == "3": - textoidiomas = textoidiomas + "VOS" + "/" + textoidiomas = textoidiomas + "VOSE" + "/" if idioma == "4": textoidiomas = textoidiomas + "VO" + "/" - + language.append(codigo_a_idioma(idioma)) textoidiomas = textoidiomas[:-1] - return textoidiomas + return textoidiomas, language def codigo_a_idioma(codigo): @@ -163,7 +165,7 @@ def codigo_a_idioma(codigo): if codigo == "2": idioma = "Latino" if codigo == "3": - idioma = "VOS" + idioma = "VOSE" if codigo == "4": idioma = "VO" @@ -195,14 +197,15 @@ def findvideos(item): for idioma, servername, scrapedurl in matches: title = "Mirror en " + servername + " (" + codigo_a_idioma(idioma) + ")" + language = codigo_a_idioma(idioma) url = urlparse.urljoin(item.url, scrapedurl) thumbnail = "" plot = "" logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") itemlist.append( Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail, - plot=plot, folder=False)) - + plot=plot, folder=False, language=language)) + itemlist = servertools.get_servers_itemlist(itemlist) return itemlist diff --git a/plugin.video.alfa/channels/serieslatino.py b/plugin.video.alfa/channels/serieslatino.py index b5e9b80f..568c2881 100644 --- a/plugin.video.alfa/channels/serieslatino.py +++ b/plugin.video.alfa/channels/serieslatino.py @@ -108,7 +108,7 @@ def lista(item): actual_page_url = item.url next_page = scrapertools.find_single_match(data, '
Siguiente<\/a><\/div>') if next_page != '': - itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=item.url + next_page, + itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=host + next_page, thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png')) return itemlist diff --git a/plugin.video.alfa/channels/seriesmeme.py b/plugin.video.alfa/channels/seriesmeme.py index 54c11ac0..2421e412 100755 --- a/plugin.video.alfa/channels/seriesmeme.py +++ b/plugin.video.alfa/channels/seriesmeme.py @@ -144,7 +144,7 @@ def lista_gen(item): context1=[renumbertools.context(item), autoplay.context] itemlist.append( Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios", - show=scrapedtitle, context=context1)) + show=scrapedtitle, context=context1, language=scrapedlang)) tmdb.set_infoLabels(itemlist) # Paginacion diff --git a/plugin.video.alfa/channels/seriesyonkis.py b/plugin.video.alfa/channels/seriesyonkis.py index 20c61a64..c9b7c9e4 100755 --- a/plugin.video.alfa/channels/seriesyonkis.py +++ b/plugin.video.alfa/channels/seriesyonkis.py @@ -171,12 +171,13 @@ def findvideos(item): matches = re.compile(pattern, re.S).findall(data) - for url, server, lang in matches: - title = "[%s] - [%s]" % (lang, server) + for url, server, language in matches: + title = "[%s] - [%s]" % (language, server) url = host + url + server = re.sub('(\..*)', '', server) logger.debug("url %s" % url) itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url, - thumbnail=item.thumbnail, lang=lang)) + thumbnail=item.thumbnail, language=language, server=server)) return itemlist @@ -191,5 +192,6 @@ def play(item): for video_item in itemlist: video_item.title = "%s [%s]" % (item.fulltitle, item.lang) video_item.thumbnail = item.thumbnail + video_item.language = item.language return itemlist diff --git a/plugin.video.alfa/channels/verpeliculasnuevas.py b/plugin.video.alfa/channels/verpeliculasnuevas.py index 84c0b2b5..cadb95dc 100755 --- a/plugin.video.alfa/channels/verpeliculasnuevas.py +++ b/plugin.video.alfa/channels/verpeliculasnuevas.py @@ -13,7 +13,7 @@ from platformcode import config, logger host = 'http://verpeliculasnuevas.com' -IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOS'} +IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOSE'} list_language = IDIOMAS.values() taudio = {'latino': '[COLOR limegreen]LATINO[/COLOR]',