diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 3f943f9b..577e9bf4 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@  - + @@ -19,13 +19,12 @@ [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] Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi diff --git a/plugin.video.alfa/channels/allcalidad.json b/plugin.video.alfa/channels/allcalidad.json index 324278a5..18c7397d 100755 --- a/plugin.video.alfa/channels/allcalidad.json +++ b/plugin.video.alfa/channels/allcalidad.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index ede804b0..ada9a02e 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -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 diff --git a/plugin.video.alfa/channels/allpeliculas.py b/plugin.video.alfa/channels/allpeliculas.py index 63481210..c67fca77 100644 --- a/plugin.video.alfa/channels/allpeliculas.py +++ b/plugin.video.alfa/channels/allpeliculas.py @@ -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): diff --git a/plugin.video.alfa/channels/cineasiaenlinea.json b/plugin.video.alfa/channels/cineasiaenlinea.json index 2ef9c1a6..b42bf5d5 100755 --- a/plugin.video.alfa/channels/cineasiaenlinea.json +++ b/plugin.video.alfa/channels/cineasiaenlinea.json @@ -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", diff --git a/plugin.video.alfa/channels/cineasiaenlinea.py b/plugin.video.alfa/channels/cineasiaenlinea.py index 17a25c83..cefff938 100755 --- a/plugin.video.alfa/channels/cineasiaenlinea.py +++ b/plugin.video.alfa/channels/cineasiaenlinea.py @@ -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, '>>': itemlist.pop() diff --git a/plugin.video.alfa/channels/maxipelis.json b/plugin.video.alfa/channels/maxipelis.json index 98a27139..3231c6d0 100644 --- a/plugin.video.alfa/channels/maxipelis.json +++ b/plugin.video.alfa/channels/maxipelis.json @@ -14,8 +14,7 @@ } ], "categories": [ - "movie", - "adult" + "movie" ], "settings": [ { diff --git a/plugin.video.alfa/channels/news.py b/plugin.video.alfa/channels/news.py old mode 100755 new mode 100644 index 068ba31d..9fd12030 --- a/plugin.video.alfa/channels/news.py +++ b/plugin.video.alfa/channels/news.py @@ -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"} + diff --git a/plugin.video.alfa/channels/pedropolis.json b/plugin.video.alfa/channels/pedropolis.json index f52134d9..6852cc86 100644 --- a/plugin.video.alfa/channels/pedropolis.json +++ b/plugin.video.alfa/channels/pedropolis.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/pedropolis.py b/plugin.video.alfa/channels/pedropolis.py index 3bfec694..6baa5edc 100644 --- a/plugin.video.alfa/channels/pedropolis.py +++ b/plugin.video.alfa/channels/pedropolis.py @@ -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 [] diff --git a/plugin.video.alfa/channels/peliculasnu.json b/plugin.video.alfa/channels/peliculasnu.json index 38e44252..3a72a2c4 100755 --- a/plugin.video.alfa/channels/peliculasnu.json +++ b/plugin.video.alfa/channels/peliculasnu.json @@ -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", diff --git a/plugin.video.alfa/channels/peliculasnu.py b/plugin.video.alfa/channels/peliculasnu.py index 8d8a5a5e..592862c6 100644 --- a/plugin.video.alfa/channels/peliculasnu.py +++ b/plugin.video.alfa/channels/peliculasnu.py @@ -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: diff --git a/plugin.video.alfa/channels/pelisfox.json b/plugin.video.alfa/channels/pelisfox.json index 3f94badb..ba226d07 100755 --- a/plugin.video.alfa/channels/pelisfox.json +++ b/plugin.video.alfa/channels/pelisfox.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py index fea2249c..fc499fe2 100644 --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -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: diff --git a/plugin.video.alfa/channels/pelisgratis.json b/plugin.video.alfa/channels/pelisgratis.json index 7f5b5e5d..5bb39d64 100755 --- a/plugin.video.alfa/channels/pelisgratis.json +++ b/plugin.video.alfa/channels/pelisgratis.json @@ -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 } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/pelisgratis.py b/plugin.video.alfa/channels/pelisgratis.py index c415d561..1cb80530 100755 --- a/plugin.video.alfa/channels/pelisgratis.py +++ b/plugin.video.alfa/channels/pelisgratis.py @@ -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() diff --git a/plugin.video.alfa/channels/pelisplanet.json b/plugin.video.alfa/channels/pelisplanet.json index d5c61c97..9c5f62a3 100644 --- a/plugin.video.alfa/channels/pelisplanet.json +++ b/plugin.video.alfa/channels/pelisplanet.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/pelisplanet.py b/plugin.video.alfa/channels/pelisplanet.py index 83306a3a..bca441ec 100644 --- a/plugin.video.alfa/channels/pelisplanet.py +++ b/plugin.video.alfa/channels/pelisplanet.py @@ -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 [] diff --git a/plugin.video.alfa/channels/playmax.json b/plugin.video.alfa/channels/playmax.json index b850ccc6..5717c5a3 100755 --- a/plugin.video.alfa/channels/playmax.json +++ b/plugin.video.alfa/channels/playmax.json @@ -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", diff --git a/plugin.video.alfa/channels/repelis.py b/plugin.video.alfa/channels/repelis.py index a80b4fec..67fb5234 100644 --- a/plugin.video.alfa/channels/repelis.py +++ b/plugin.video.alfa/channels/repelis.py @@ -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 \ No newline at end of file + return output diff --git a/plugin.video.alfa/channels/sipeliculas.json b/plugin.video.alfa/channels/sipeliculas.json index 62377c04..d7f7a1f2 100755 --- a/plugin.video.alfa/channels/sipeliculas.json +++ b/plugin.video.alfa/channels/sipeliculas.json @@ -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 } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/sipeliculas.py b/plugin.video.alfa/channels/sipeliculas.py index 95ba9295..9d8a56e4 100755 --- a/plugin.video.alfa/channels/sipeliculas.py +++ b/plugin.video.alfa/channels/sipeliculas.py @@ -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 \ No newline at end of file diff --git a/plugin.video.alfa/channels/vepelis.json b/plugin.video.alfa/channels/vepelis.json index 535de3d5..e1c5517e 100755 --- a/plugin.video.alfa/channels/vepelis.json +++ b/plugin.video.alfa/channels/vepelis.json @@ -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 } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/vepelis.py b/plugin.video.alfa/channels/vepelis.py index 574cce96..1e9f9ef7 100755 --- a/plugin.video.alfa/channels/vepelis.py +++ b/plugin.video.alfa/channels/vepelis.py @@ -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 diff --git a/plugin.video.alfa/channels/verpelis.json b/plugin.video.alfa/channels/verpelis.json index 4ce5372b..d12fd5d7 100644 --- a/plugin.video.alfa/channels/verpelis.json +++ b/plugin.video.alfa/channels/verpelis.json @@ -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 + } ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/verpelis.py b/plugin.video.alfa/channels/verpelis.py index 656298ce..5f9a2ac7 100644 --- a/plugin.video.alfa/channels/verpelis.py +++ b/plugin.video.alfa/channels/verpelis.py @@ -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 diff --git a/plugin.video.alfa/channels/yaske.json b/plugin.video.alfa/channels/yaske.json index de44f7df..e46ecee0 100644 --- a/plugin.video.alfa/channels/yaske.json +++ b/plugin.video.alfa/channels/yaske.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/yaske.py b/plugin.video.alfa/channels/yaske.py index 74024bc4..2f63fccc 100644 --- a/plugin.video.alfa/channels/yaske.py +++ b/plugin.video.alfa/channels/yaske.py @@ -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 [] diff --git a/plugin.video.alfa/channels/zonatorrent.json b/plugin.video.alfa/channels/zonatorrent.json index c12b81c3..add8e331 100644 --- a/plugin.video.alfa/channels/zonatorrent.json +++ b/plugin.video.alfa/channels/zonatorrent.json @@ -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 } ] } diff --git a/plugin.video.alfa/channels/zonatorrent.py b/plugin.video.alfa/channels/zonatorrent.py index 8c637e7c..e983fdf8 100644 --- a/plugin.video.alfa/channels/zonatorrent.py +++ b/plugin.video.alfa/channels/zonatorrent.py @@ -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 = ']+href="([^"]+)"[^<]+]+>(.*?)]+>(.*?)' \ '(.*?)' @@ -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 diff --git a/plugin.video.alfa/resources/media/general/default/thumb_channels_horror.png b/plugin.video.alfa/resources/media/general/default/thumb_channels_horror.png new file mode 100644 index 00000000..0d9abdf0 Binary files /dev/null and b/plugin.video.alfa/resources/media/general/default/thumb_channels_horror.png differ