Update animeshd.py
This commit is contained in:
@@ -8,6 +8,19 @@ from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
|
||||
IDIOMAS = {'Latino': 'LAT', 'Castellano':'CAST','Subtitulado': 'VOS'}
|
||||
list_language = IDIOMAS.values()
|
||||
logger.debug('lista_language: %s' % list_language)
|
||||
|
||||
list_quality = ['default']
|
||||
list_servers = [
|
||||
'rapidvideo',
|
||||
'downace',
|
||||
'openload'
|
||||
]
|
||||
|
||||
tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
||||
"Drama": "https://s16.postimg.org/94sia332d/drama.png",
|
||||
@@ -35,6 +48,8 @@ headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(title="Ultimas",
|
||||
@@ -65,6 +80,8 @@ def mainlist(item):
|
||||
fanart='https://s30.postimg.org/pei7txpa9/buscar.png'
|
||||
))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -161,10 +178,16 @@ def episodios(item):
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedlang, scrapedtitle in matches:
|
||||
language = scrapedlang
|
||||
language = IDIOMAS[scrapedlang]
|
||||
|
||||
title = scrapedtitle + ' (%s)' % language
|
||||
url = scrapedurl
|
||||
itemlist.append(item.clone(title=title, url=url, action='findvideos', language=language))
|
||||
itemlist.append(item.clone(title=title,
|
||||
url=url,
|
||||
action='findvideos',
|
||||
language=language,
|
||||
quality ='default'
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -180,6 +203,13 @@ def findvideos(item):
|
||||
videoitem.channel = item.channel
|
||||
videoitem.title = title
|
||||
videoitem.action = 'play'
|
||||
videoitem.language = item.language
|
||||
|
||||
# Requerido para FilterTools
|
||||
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
Reference in New Issue
Block a user