"
+ "")
+ if next_page != '' and i == item.pages:
+ itemlist.append(Item(channel=item.channel, action="list_all", title='Siguiente >>>', url=next_page,
+ pages=item.pages))
+ else:
+ item.url=next_page
+ i += 1
+
+ return itemlist
+
+
+
+def section(item):
+ logger.info()
+
+ itemlist = []
+ data=get_source(host)
+ if item.title == 'Generos':
+ data = scrapertools.find_single_match(data, 'tabindex="0">Generos<.*?')
+ elif 'Años' in item.title:
+ data = scrapertools.find_single_match(data, 'tabindex="0">Año<.*?')
+
+ patron = 'href="([^"]+)">([^<]+)'
+
+ matches = re.compile(patron, re.DOTALL).findall(data)
+
+ for url, title in matches:
+
+ itemlist.append(Item(channel=item.channel, title=title, url=url, action='list_all', pages=3))
+
+ return itemlist
+
+
+def findvideos(item):
+ logger.info()
+
+ itemlist = []
+ data = get_source(item.url)
+ patron = '<(?:iframe|IFRAME).*?(?:src|SRC)="([^"]+)"'
+ matches = re.compile(patron, re.DOTALL).findall(data)
+
+ for scrapedurl in matches:
+ if 'http' not in scrapedurl:
+ url = 'http:'+scrapedurl
+ else:
+ url = scrapedurl
+
+ itemlist.append(Item(channel=item.channel, title='%s', url=url, action='play', language=IDIOMAS['Latino'],
+ infoLabels=item.infoLabels))
+
+ itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % x.server.capitalize())
+
+ # Requerido para FilterTools
+
+ itemlist = filtertools.get_links(itemlist, item, list_language)
+
+ # Requerido para AutoPlay
+
+ autoplay.start(itemlist, item)
+
+ if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
+ itemlist.append(Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
+ url=item.url, action="add_pelicula_to_library", extra="findvideos",
+ contentTitle=item.contentTitle))
+
+ return itemlist
+
+
+def search(item, texto):
+ logger.info()
+ itemlist = []
+ texto = texto.replace(" ", "+")
+ item.url = item.url + texto
+ if texto != '':
+ try:
+ return list_all(item)
+ except:
+ itemlist.append(item.clone(url='', title='No hay elementos...', action=''))
+ return itemlist
+
+def newest(categoria):
+ logger.info()
+ itemlist = []
+ item = Item()
+ try:
+ if categoria in ['peliculas', 'latino']:
+ item.url = host + '?s='
+ elif categoria == 'infantiles':
+ item.url = host + 'genre/animacion/'
+ elif categoria == 'terror':
+ item.url = host + 'genre/terror/'
+ item.pages=3
+ itemlist = list_all(item)
+ if itemlist[-1].title == 'Siguiente >>>':
+ itemlist.pop()
+ except:
+ import sys
+ for line in sys.exc_info():
+ logger.error("{0}".format(line))
+ return []
+
+ return itemlist
+
diff --git a/plugin.video.alfa/channels/special.json b/plugin.video.alfa/channels/special.json
new file mode 100644
index 00000000..ace9d3a0
--- /dev/null
+++ b/plugin.video.alfa/channels/special.json
@@ -0,0 +1,12 @@
+{
+ "id": "special",
+ "name": "",
+ "active": true,
+ "adult": false,
+ "language": [],
+ "thumbnail": "https://i.postimg.cc/FR2nygS0/g4567.png",
+ "banner": "",
+ "categories": [
+ "movie"
+ ]
+}
diff --git a/plugin.video.alfa/channels/special.py b/plugin.video.alfa/channels/special.py
new file mode 100644
index 00000000..836d9c19
--- /dev/null
+++ b/plugin.video.alfa/channels/special.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+# -*- Channel Halloween -*-
+# -*- Created for Alfa-addon -*-
+# -*- By the Alfa Develop Group -*-
+
+import re
+
+from channels import autoplay
+from channels import filtertools
+from core import httptools
+from core import scrapertools
+from core import servertools
+from core import jsontools
+from core import tmdb
+from core.item import Item
+from platformcode import config, logger
+from channelselector import get_thumb
+
+host = 'https://www.imdb.com/list/ls027655523/?sort=list_order,asc&st_dt=&mode=detail&page='
+
+
+def get_source(url):
+ logger.info()
+ data = httptools.downloadpage(url).data
+ data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data)
+ return data
+
+def mainlist(item):
+ logger.info()
+ item.url = host
+ item.first = 60
+ item.last = 80
+ item.page = 1
+ return list_all(item)
+
+
+def list_all(item):
+ logger.info()
+ from core import jsontools
+ itemlist = []
+
+ data = get_source('%s%s' % (host, item.page))
+ data = scrapertools.find_single_match(data, '"itemListElement":([^\]]+)\]')
+ data = data + ']'
+ #logger.debug(data)
+ movie_list = eval(data)
+ for movie in movie_list[item.first:item.last]:
+
+ IMDBNumber = movie['url'].replace('title','').replace('/','')
+
+
+ new_item = Item(channel='search', contentType='movie', action='do_search',
+ infoLabels={'imdb_id': IMDBNumber})
+
+ #new_item.infoLabels = tmdb.find_and_set_infoLabels(new_item)
+ itemlist.append(new_item)
+ logger.debug('id %s' % IMDBNumber)
+ #logger.debug(new_item)
+
+
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
+
+ for movie in itemlist:
+ movie.title = movie.infoLabels['title']
+ movie.wanted = movie.title
+
+ if item.last + 20 < len(movie_list):
+ first = item.last
+ last = item.last + 20
+ page = item.page
+ else:
+ first = 0
+ last = 20
+ page = item.page + 1
+
+ itemlist.append(Item(channel=item.channel, title='Siguiente >>', action='list_all',
+ last=last, first=first, page=page))
+ return itemlist
diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py
index 7fe2fc62..92b7e881 100644
--- a/plugin.video.alfa/platformcode/platformtools.py
+++ b/plugin.video.alfa/platformcode/platformtools.py
@@ -229,8 +229,10 @@ def render_items(itemlist, parent_item):
set_infolabels(listitem, item)
# Montamos el menu contextual
- context_commands = set_context_commands(item, parent_item)
-
+ if parent_item.channel != 'special':
+ context_commands = set_context_commands(item, parent_item)
+ else:
+ context_commands = []
# Añadimos el item
if config.get_platform(True)['num_version'] >= 17.0 and parent_item.list_type == '':
listitem.addContextMenuItems(context_commands)
@@ -1091,16 +1093,19 @@ def play_torrent(item, xlistitem, mediaurl):
mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'], item.infoLabels['tmdb_id'])
elif item.contentType == 'movie':
mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id'])
-
+
xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")")
#Seleccionamos que clientes torrent soportamos para el marcado de vídeos vistos: asumimos que todos funcionan
#if "quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]:
+
time_limit = time.time() + 150 #Marcamos el timepo máx. de buffering
while not is_playing() and time.time() < time_limit: #Esperamos mientra buffera
time.sleep(5) #Repetimos cada intervalo
#logger.debug(str(time_limit))
-
+ if item.subtitle != '':
+ xbmc_player.setSubtitles(item.subtitle)
+
if item.strm_path and is_playing(): #Sólo si es de Videoteca
from platformcode import xbmc_videolibrary
xbmc_videolibrary.mark_auto_as_watched(item) #Marcamos como visto al terminar
diff --git a/plugin.video.alfa/platformcode/unify.py b/plugin.video.alfa/platformcode/unify.py
index 70536b18..d095ad7d 100644
--- a/plugin.video.alfa/platformcode/unify.py
+++ b/plugin.video.alfa/platformcode/unify.py
@@ -49,6 +49,7 @@ thumb_dict = {"movies": "https://s10.postimg.cc/fxtqzdog9/peliculas.png",
"animacion": "https://s14.postimg.cc/vl193mupd/animation.png",
"anime" : "https://s10.postimg.cc/n9mc2ikzt/anime.png",
"artes marciales" : "https://s10.postimg.cc/4u1v51tzt/martial_arts.png",
+ "asiaticas" : "https://i.postimg.cc/Xq0HXD5d/asiaticas.png",
"aventura": "https://s14.postimg.cc/ky7fy5he9/adventure.png",
"belico": "https://s14.postimg.cc/5e027lru9/war.png",
"biografia" : "https://s10.postimg.cc/jq0ecjxnt/biographic.png",