Aggiunto AnimeSubIta, fix support
This commit is contained in:
@@ -31,6 +31,38 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
|
}, {
|
||||||
|
"id": "checklinks",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Verifica se i link esistono",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "checklinks_number",
|
||||||
|
"type": "list",
|
||||||
|
"label": "Numero de link da verificare",
|
||||||
|
"default": 1,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": "eq(-1,true)",
|
||||||
|
"lvalues": [ "1", "3", "5", "10" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "autorenumber",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "@70712",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "autorenumber_mode",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "@70688",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": "eq(-1,true)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+72
-259
@@ -1,7 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Ringraziamo Icarus crew
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Ringraziamo Icarus crew
|
|
||||||
# Canale per AnimeSubIta
|
# Canale per AnimeSubIta
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
@@ -12,45 +10,25 @@ import urlparse
|
|||||||
from core import httptools, scrapertools, tmdb, support
|
from core import httptools, scrapertools, tmdb, support
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
from core import support
|
||||||
|
|
||||||
__channel__ = "animesubita"
|
__channel__ = "animesubita"
|
||||||
host = config.get_channel_url(__channel__)
|
host = support.config.get_channel_url(__channel__)
|
||||||
PERPAGE = 20
|
headers = {'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
list_servers = ['directo']
|
||||||
|
list_quality = ['default']
|
||||||
|
|
||||||
|
|
||||||
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
anime = ['/lista-anime/',
|
||||||
itemlist = [Item(channel=item.channel,
|
('Ultimi Episodi',['/category/ultimi-episodi/', 'peliculas', 'updated']),
|
||||||
action="lista_anime_completa",
|
('in Corso',['/category/anime-in-corso/', 'peliculas', 'alt']),
|
||||||
title=support.color("Lista Anime", "azure"),
|
('Generi',['/generi/', 'genres', 'alt'])]
|
||||||
url="%s/lista-anime/" % host,
|
return locals()
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="ultimiep",
|
|
||||||
title=support.color("Ultimi Episodi", "azure"),
|
|
||||||
url="%s/category/ultimi-episodi/" % host,
|
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="lista_anime",
|
|
||||||
title=support.color("Anime in corso", "azure"),
|
|
||||||
url="%s/category/anime-in-corso/" % host,
|
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="categorie",
|
|
||||||
title=support.color("Categorie", "azure"),
|
|
||||||
url="%s/generi/" % host,
|
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="search",
|
|
||||||
title=support.color("Cerca anime ...", "yellow"),
|
|
||||||
extra="anime",
|
|
||||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")
|
|
||||||
]
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
@@ -58,8 +36,8 @@ def newest(categoria):
|
|||||||
try:
|
try:
|
||||||
if categoria == "anime":
|
if categoria == "anime":
|
||||||
item.url = host
|
item.url = host
|
||||||
item.action = "ultimiep"
|
item.args = "updated"
|
||||||
itemlist = ultimiep(item)
|
itemlist = peliculas(item)
|
||||||
|
|
||||||
if itemlist[-1].action == "ultimiep":
|
if itemlist[-1].action == "ultimiep":
|
||||||
itemlist.pop()
|
itemlist.pop()
|
||||||
@@ -72,13 +50,13 @@ def newest(categoria):
|
|||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info()
|
logger.info()
|
||||||
item.url = host + "/?s=" + texto
|
item.url = host + "/?s=" + texto
|
||||||
|
item.args = 'alt'
|
||||||
try:
|
try:
|
||||||
return lista_anime(item)
|
return peliculas(item)
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
@@ -87,9 +65,13 @@ def search(item, texto):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
# ================================================================================================================
|
@support.scrape
|
||||||
|
def genres(item):
|
||||||
|
blacklist= ['Anime In Corso','Ultimi Episodi']
|
||||||
|
patronMenu=r'<li><a title="[^"]+" href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
||||||
|
action = 'peliculas'
|
||||||
|
return locals()
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def categorie(item):
|
def categorie(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
@@ -110,234 +92,65 @@ def categorie(item):
|
|||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def ultimiep(item):
|
|
||||||
logger.info("ultimiep")
|
|
||||||
itemlist = lista_anime(item, False, False)
|
|
||||||
|
|
||||||
for itm in itemlist:
|
@support.scrape
|
||||||
title = scrapertools.decodeHtmlentities(itm.title)
|
def peliculas(item):
|
||||||
# Pulizia titolo
|
anime = True
|
||||||
title = title.replace("Streaming", "").replace("&", "")
|
if item.args == 'updated':
|
||||||
title = title.replace("Download", "")
|
patron = r'<div class="post-thumbnail">\s*<a href="(?P<url>[^"]+)" title="(?P<title>.*?)\s*(?P<episode>Episodio \d+)[^"]+"[^>]*>\s*<img[^src]+src="(?P<thumb>[^"]+)"'
|
||||||
title = title.replace("Sub Ita", "").strip()
|
patronNext = r'<link rel="next" href="([^"]+)"\s*/>'
|
||||||
eptype = scrapertools.find_single_match(title, "((?:Episodio?|OAV))")
|
action = 'findvideos'
|
||||||
cleantitle = re.sub(r'%s\s*\d*\s*(?:\(\d+\)|)' % eptype, '', title).strip()
|
elif item.args == 'alt':
|
||||||
# Creazione URL
|
# debug = True
|
||||||
url = re.sub(r'%s-?\d*-' % eptype.lower(), '', itm.url)
|
patron = r'<div class="post-thumbnail">\s*<a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?: [Oo][Aa][Vv])?(?:\s*(?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa]))[^"]+">\s*<img[^src]+src="(?P<thumb>[^"]+)"'
|
||||||
if "-streaming" not in url:
|
patronNext = r'<link rel="next" href="([^"]+)"\s*/>'
|
||||||
url = url.replace("sub-ita", "sub-ita-streaming")
|
action = 'episodios'
|
||||||
|
else:
|
||||||
|
pagination = ''
|
||||||
|
patronBlock = r'<ul class="lcp_catlist"[^>]+>(?P<block>.*?)</ul>'
|
||||||
|
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)(?: [Oo][Aa][Vv])?(?:\s*(?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa])[^<]+)?</a>'
|
||||||
|
action = 'episodios'
|
||||||
|
return locals()
|
||||||
|
|
||||||
epnumber = ""
|
@support.scrape
|
||||||
if 'episodio' in eptype.lower():
|
def episodios(item):
|
||||||
epnumber = scrapertools.find_single_match(title.lower(), r'episodio?\s*(\d+)')
|
anime = True
|
||||||
eptype += ":? " + epnumber
|
patron = r'<td style="[^"]*?">\s*.*?<strong>(?P<episode>[^<]+)</strong>\s*</td>\s*<td[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img src="(?P<thumb>[^"]+?)"[^>]+>'
|
||||||
|
return locals()
|
||||||
extra = "<tr>\s*<td[^>]+><strong>(?:[^>]+>|)%s(?:[^>]+>[^>]+>|[^<]*|[^>]+>)</strong>" % eptype
|
|
||||||
itm.title = support.color(title, 'azure').strip()
|
|
||||||
itm.action = "findvideos"
|
|
||||||
itm.url = url
|
|
||||||
itm.fulltitle = cleantitle
|
|
||||||
itm.extra = extra
|
|
||||||
itm.show = re.sub(r'Episodio\s*', '', title)
|
|
||||||
itm.thumbnail = item.thumbnail
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
# ================================================================================================================
|
def findvideos(item):
|
||||||
|
support.log(item)
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def lista_anime(item, nextpage=True, show_lang=True):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
if item.args == 'updated':
|
||||||
blocco = scrapertools.find_single_match(data, r'<div class="post-list group">(.*?)</nav><!--/.pagination-->')
|
ep = support.match(item.fulltitle,r'(Episodio\s*\d+)')[0][0]
|
||||||
# patron = r'<a href="([^"]+)" title="([^"]+)">\s*<img[^s]+src="([^"]+)"[^>]+>' # Patron con thumbnail, Kodi non scarica le immagini dal sito
|
item.url = support.re.sub(r'episodio-\d+-|oav-\d+-', '',item.url)
|
||||||
patron = r'<a href="([^"]+)" title="([^"]+)">'
|
if 'streaming' not in item.url: item.url = item.url.replace('sub-ita','sub-ita-streaming')
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
item.url = support.match(item, r'<a href="([^"]+)"[^>]+>', ep + '(.*?)</tr>', )[0][0]
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
urls = support.match(item.url, r'(episodio\d*.php.*)')[0]
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
for url in urls:
|
||||||
scrapedtitle = re.sub(r'\s+', ' ', scrapedtitle)
|
url = host + '/' + url
|
||||||
# Pulizia titolo
|
headers['Referer'] = url
|
||||||
scrapedtitle = scrapedtitle.replace("Streaming", "").replace("&", "")
|
data = support.match(item, headers=headers, url=url)[1]
|
||||||
scrapedtitle = scrapedtitle.replace("Download", "")
|
cookies = ""
|
||||||
lang = scrapertools.find_single_match(scrapedtitle, r"([Ss][Uu][Bb]\s*[Ii][Tt][Aa])")
|
matches = support.re.compile('(.%s.*?)\n' % host.replace("http://", "").replace("www.", ""), re.DOTALL).findall(config.get_cookie_data())
|
||||||
scrapedtitle = scrapedtitle.replace("Sub Ita", "").strip()
|
for cookie in matches:
|
||||||
eptype = scrapertools.find_single_match(scrapedtitle, "((?:Episodio?|OAV))")
|
cookies += cookie.split('\t')[5] + "=" + cookie.split('\t')[6] + ";"
|
||||||
cleantitle = re.sub(r'%s\s*\d*\s*(?:\(\d+\)|)' % eptype, '', scrapedtitle)
|
|
||||||
|
|
||||||
|
headers['Cookie'] = cookies[:-1]
|
||||||
cleantitle = cleantitle.replace(lang, "").strip()
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="episodi",
|
|
||||||
contentType="tvshow" if 'oav' not in scrapedtitle.lower() else "movie",
|
|
||||||
title=scrapedtitle.replace(lang, "(%s)" % support.color(lang, "red") if show_lang else "").strip(),
|
|
||||||
fulltitle=cleantitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
show=cleantitle,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
|
|
||||||
if nextpage:
|
|
||||||
patronvideos = r'<link rel="next" href="([^"]+)"\s*/>'
|
|
||||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
if len(matches) > 0:
|
url = support.match(data, r'<source src="([^"]+)"[^>]+>')[0][0] + '|' + urllib.urlencode(headers)
|
||||||
scrapedurl = matches[0]
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="lista_anime",
|
|
||||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def lista_anime_completa(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
p = 1
|
|
||||||
if '{}' in item.url:
|
|
||||||
item.url, p = item.url.split('{}')
|
|
||||||
p = int(p)
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
blocco = scrapertools.find_single_match(data, r'<ul class="lcp_catlist"[^>]+>(.*?)</ul>')
|
|
||||||
patron = r'<a href="([^"]+)"[^>]+>([^<]+)</a>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
|
||||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
|
||||||
if (p - 1) * PERPAGE > i: continue
|
|
||||||
if i >= p * PERPAGE: break
|
|
||||||
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip())
|
|
||||||
cleantitle = scrapedtitle.replace("Sub Ita Streaming", "").replace("Ita Streaming", "")
|
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="episodi",
|
action="play",
|
||||||
contentType="tvshow" if 'oav' not in scrapedtitle.lower() else "movie",
|
title='diretto',
|
||||||
title=support.color(scrapedtitle, 'azure'),
|
quality='',
|
||||||
fulltitle=cleantitle,
|
url=url,
|
||||||
show=cleantitle,
|
server='directo',
|
||||||
url=scrapedurl,
|
fulltitle=item.fulltitle,
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
|
|
||||||
if len(matches) >= p * PERPAGE:
|
|
||||||
scrapedurl = item.url + '{}' + str(p + 1)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
extra=item.extra,
|
|
||||||
action="lista_anime_completa",
|
|
||||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def episodi(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
patron = '<td style="[^"]*?">\s*.*?<strong>(.*?)</strong>.*?\s*</td>\s*<td style="[^"]*?">\s*<a href="([^"]+?)"[^>]+>\s*<img.*?src="([^"]+?)".*?/>\s*</a>\s*</td>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedtitle, scrapedurl, scrapedimg in matches:
|
|
||||||
if 'nodownload' in scrapedimg or 'nostreaming' in scrapedimg:
|
|
||||||
continue
|
|
||||||
if 'vvvvid' in scrapedurl.lower():
|
|
||||||
itemlist.append(Item(title='I Video VVVVID Non sono supportati'))
|
|
||||||
continue
|
|
||||||
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
scrapedtitle = re.sub(r'<[^>]*?>', '', scrapedtitle)
|
|
||||||
scrapedtitle = '[COLOR azure][B]' + scrapedtitle + '[/B][/COLOR]'
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="findvideos",
|
|
||||||
contentType="episode",
|
|
||||||
title=scrapedtitle,
|
|
||||||
url=urlparse.urljoin(host, scrapedurl),
|
|
||||||
fulltitle=item.title,
|
|
||||||
show=scrapedtitle,
|
|
||||||
plot=item.plot,
|
|
||||||
fanart=item.thumbnail,
|
|
||||||
thumbnail=item.thumbnail))
|
|
||||||
|
|
||||||
# Comandi di servizio
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
|
||||||
url=item.url,
|
|
||||||
action="add_serie_to_library",
|
|
||||||
extra="episodios",
|
|
||||||
show=item.show))
|
show=item.show))
|
||||||
|
|
||||||
return itemlist
|
return support.server(item,url,itemlist)
|
||||||
|
|
||||||
# ================================================================================================================
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
|
||||||
def findvideos(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
headers = {'Upgrade-Insecure-Requests': '1',
|
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'}
|
|
||||||
|
|
||||||
if item.extra:
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
|
||||||
blocco = scrapertools.find_single_match(data, r'%s(.*?)</tr>' % item.extra)
|
|
||||||
item.url = scrapertools.find_single_match(blocco, r'<a href="([^"]+)"[^>]+>')
|
|
||||||
|
|
||||||
patron = r'http:\/\/link[^a]+animesubita[^o]+org\/[^\/]+\/.*?(episodio\d*)[^p]+php(\?.*)'
|
|
||||||
for phpfile, scrapedurl in re.findall(patron, item.url, re.DOTALL):
|
|
||||||
url = "%s/%s.php%s" % (host, phpfile, scrapedurl)
|
|
||||||
headers['Referer'] = url
|
|
||||||
data = httptools.downloadpage(url, headers=headers).data
|
|
||||||
# ------------------------------------------------
|
|
||||||
cookies = ""
|
|
||||||
matches = re.compile('(.%s.*?)\n' % host.replace("http://", "").replace("www.", ""), re.DOTALL).findall(config.get_cookie_data())
|
|
||||||
for cookie in matches:
|
|
||||||
name = cookie.split('\t')[5]
|
|
||||||
value = cookie.split('\t')[6]
|
|
||||||
cookies += name + "=" + value + ";"
|
|
||||||
headers['Cookie'] = cookies[:-1]
|
|
||||||
# ------------------------------------------------
|
|
||||||
scrapedurl = scrapertools.find_single_match(data, r'<source src="([^"]+)"[^>]+>')
|
|
||||||
url = scrapedurl + '|' + urllib.urlencode(headers)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="play",
|
|
||||||
text_color="azure",
|
|
||||||
title="[%s] %s" % (support.color("Diretto", "orange"), item.title),
|
|
||||||
fulltitle=item.fulltitle,
|
|
||||||
url=url,
|
|
||||||
thumbnail=item.thumbnail,
|
|
||||||
fanart=item.thumbnail,
|
|
||||||
plot=item.plot))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|||||||
+5
-6
@@ -731,9 +731,9 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
# Simply add this function to add video library support
|
# Simply add this function to add video library support
|
||||||
# Function_level is useful if the function is called by another function.
|
# Function_level is useful if the function is called by another function.
|
||||||
# If the call is direct, leave it blank
|
# If the call is direct, leave it blank
|
||||||
log(item)
|
log()
|
||||||
|
|
||||||
if item.contentType != 'episode':
|
if item.contentType == 'movie':
|
||||||
action = 'add_pelicula_to_library'
|
action = 'add_pelicula_to_library'
|
||||||
extra = 'findvideos'
|
extra = 'findvideos'
|
||||||
contentType = 'movie'
|
contentType = 'movie'
|
||||||
@@ -742,8 +742,7 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
extra = 'episodios'
|
extra = 'episodios'
|
||||||
contentType = 'tvshow'
|
contentType = 'tvshow'
|
||||||
|
|
||||||
log('FUNCTION = ',function)
|
function = function if function else inspect.stack()[function_level][3]
|
||||||
|
|
||||||
|
|
||||||
if not typography: typography = 'color kod bold'
|
if not typography: typography = 'color kod bold'
|
||||||
|
|
||||||
@@ -751,8 +750,8 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
contentSerieName=item.contentSerieName if item.contentSerieName else ''
|
contentSerieName=item.contentSerieName if item.contentSerieName else ''
|
||||||
contentTitle=item.contentTitle if item.contentTitle else ''
|
contentTitle=item.contentTitle if item.contentTitle else ''
|
||||||
|
|
||||||
if (inspect.stack()[function_level][3] == 'findvideos' and contentType == 'movie' \
|
if (function == 'findvideos' and contentType == 'movie') \
|
||||||
or inspect.stack()[function_level][3] != 'findvideos' and contentType != 'movie'):
|
or (function == 'episodios' and contentType != 'movie'):
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 306 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
Reference in New Issue
Block a user