Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
@@ -258,7 +258,7 @@ def episodios(item):
|
|||||||
log()
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.replace('\n', '')
|
data = httptools.downloadpage(item.url, headers=headers).data.replace('\n', '')
|
||||||
block1 = scrapertoolsV2.find_single_match(data, r'<div class="widget servers".*?>(.*?)<div id="download"')
|
block1 = scrapertoolsV2.find_single_match(data, r'<div class="widget servers".*?>(.*?)<div id="download"')
|
||||||
block = scrapertoolsV2.find_single_match(block1,r'<div class="server.*?>(.*?)<div class="server.*?>')
|
block = scrapertoolsV2.find_single_match(block1,r'<div class="server.*?>(.*?)<div class="server.*?>')
|
||||||
|
|
||||||
@@ -301,18 +301,17 @@ def findvideos(item):
|
|||||||
data = item.extra['data']
|
data = item.extra['data']
|
||||||
episode = item.extra['episode']
|
episode = item.extra['episode']
|
||||||
else:
|
else:
|
||||||
data = httptools.downloadpage(item.url,headers=headers).data
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)</div>')
|
block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)</div>')
|
||||||
servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)</span')
|
servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)</span')
|
||||||
|
|
||||||
videolist = []
|
videolist = []
|
||||||
videoData = ''
|
videoData = ''
|
||||||
|
|
||||||
for serverid, servername in servers:
|
for serverid, servername in servers:
|
||||||
#recupero l'id del video per questo server
|
#recupero l'id del video per questo server
|
||||||
block = scrapertoolsV2.find_single_match(data,r'<div class="server.*?data-id="'+serverid+'">(.*?)</ul>')
|
block = str(scrapertoolsV2.find_multiple_matches(data,r'<div class="server.*?data-id="'+serverid+'">(.*?)</ul>'))
|
||||||
id = scrapertoolsV2.find_single_match(block,r'<a\sdata-id="([^"]+)"\sdata-base="'+episode+'"')
|
id = scrapertoolsV2.find_single_match(data,r'<a\sdata-id="([^"]+)"\sdata-base="'+episode+'"')
|
||||||
|
|
||||||
dataJson = httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, id, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data
|
dataJson = httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, id, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data
|
||||||
json = jsontools.load(dataJson)
|
json = jsontools.load(dataJson)
|
||||||
|
|||||||
+10
-11
@@ -51,12 +51,12 @@ def mainlist(item):
|
|||||||
support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno")
|
support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno")
|
||||||
support.menu(itemlist, 'Cerca film... submenu', 'search', host, args='film')
|
support.menu(itemlist, 'Cerca film... submenu', 'search', host, args='film')
|
||||||
|
|
||||||
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode')
|
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='tvshow')
|
||||||
support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='episode')
|
support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='tvshow')
|
||||||
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera")
|
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Lettera")
|
||||||
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere")
|
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Genere")
|
||||||
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno")
|
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Anno")
|
||||||
support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='episode', args='serie')
|
support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='tvshow', args='serie')
|
||||||
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ def last(item):
|
|||||||
infoLabels = {}
|
infoLabels = {}
|
||||||
quality = ''
|
quality = ''
|
||||||
|
|
||||||
if item.contentType == 'episode':
|
if item.contentType == 'tvshow':
|
||||||
matches = support.match(item, r'<a href="([^">]+)".*?>([^(:(|[)]+)([^<]+)<\/a>', '<article class="sequex-post-content.*?</article>', headers)[0]
|
matches = support.match(item, r'<a href="([^">]+)".*?>([^(:(|[)]+)([^<]+)<\/a>', '<article class="sequex-post-content.*?</article>', headers)[0]
|
||||||
else:
|
else:
|
||||||
matches = support.match(item, r'<a href=([^>]+)>([^(:(|[)]+)([^<]+)<\/a>', r'<strong>Ultimi 100 film Aggiornati:<\/a><\/strong>(.*?)<td>', headers)[0]
|
matches = support.match(item, r'<a href=([^>]+)>([^(:(|[)]+)([^<]+)<\/a>', r'<strong>Ultimi 100 film Aggiornati:<\/a><\/strong>(.*?)<td>', headers)[0]
|
||||||
@@ -127,7 +127,7 @@ def last(item):
|
|||||||
for url, title, info in matches:
|
for url, title, info in matches:
|
||||||
add = True
|
add = True
|
||||||
title = title.rstrip()
|
title = title.rstrip()
|
||||||
if item.contentType == 'episode':
|
if item.contentType == 'tvshow':
|
||||||
for i in itemlist:
|
for i in itemlist:
|
||||||
if i.url == url: # togliamo i doppi
|
if i.url == url: # togliamo i doppi
|
||||||
add = False
|
add = False
|
||||||
@@ -143,7 +143,7 @@ def last(item):
|
|||||||
if add:
|
if add:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action='findvideos' if item.contentType != 'episode' else 'episodios',
|
action='findvideos' if item.contentType == 'movie' else 'episodios',
|
||||||
contentType=item.contentType,
|
contentType=item.contentType,
|
||||||
title=longtitle,
|
title=longtitle,
|
||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
@@ -177,7 +177,6 @@ def peliculas(item):
|
|||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
item.contentType = 'episode'
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
@@ -202,7 +201,7 @@ def episodios(item):
|
|||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="findvideos",
|
action="findvideos",
|
||||||
contentType=item.contentType,
|
contentType='episode',
|
||||||
title="[B]" + episode + "[/B] " + season,
|
title="[B]" + episode + "[/B] " + season,
|
||||||
fulltitle=episode + " " + season,
|
fulltitle=episode + " " + season,
|
||||||
show=episode + " " + season,
|
show=episode + " " + season,
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ def mainlist(item):
|
|||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
|
||||||
support.menu(itemlist, '[B]Film[/B]', 'peliculas', host + '/category/film/', 'movie')
|
support.menu(itemlist, '[B]Film[/B]', 'peliculas', host + '/category/film/', 'movie')
|
||||||
support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'episode')
|
support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'tvshow')
|
||||||
support.menu(itemlist, '[COLOR blue]Cerca Film...[/COLOR]', 'search', '')
|
support.menu(itemlist, '[COLOR blue]Cerca Film...[/COLOR]', 'search', '')
|
||||||
support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'episode')
|
support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'tvshow')
|
||||||
support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'episode')
|
support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'tvshow')
|
||||||
support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'episode')
|
support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'tvshow')
|
||||||
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
@@ -129,7 +129,7 @@ def peliculas(item):
|
|||||||
|
|
||||||
longtitle = title + ' [COLOR blue][' + quality + '][/COLOR]'
|
longtitle = title + ' [COLOR blue][' + quality + '][/COLOR]'
|
||||||
|
|
||||||
if item.contentType == 'episode':
|
if item.contentType == 'tvshow':
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
else:
|
else:
|
||||||
action ='findvideos'
|
action ='findvideos'
|
||||||
@@ -181,7 +181,7 @@ def episodios(item):
|
|||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action='findvideos',
|
action='findvideos',
|
||||||
contentType=item.contentType,
|
contentType='episode',
|
||||||
title=title,
|
title=title,
|
||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
show=title,
|
show=title,
|
||||||
@@ -206,7 +206,7 @@ def episodios(item):
|
|||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
show=title,
|
show=title,
|
||||||
url=url,
|
url=url,
|
||||||
contentType=item.contentType,
|
contentType='episodie',
|
||||||
action='findvideos'
|
action='findvideos'
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ def mainlist(item):
|
|||||||
menu(itemlist, 'Film', 'peliculas', host + '/film/')
|
menu(itemlist, 'Film', 'peliculas', host + '/film/')
|
||||||
menu(itemlist, 'Film Per Categoria', 'category', host, args='genres')
|
menu(itemlist, 'Film Per Categoria', 'category', host, args='genres')
|
||||||
menu(itemlist, 'Film Per Anno', 'category', host, args='year')
|
menu(itemlist, 'Film Per Anno', 'category', host, args='year')
|
||||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'episode')
|
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'tvshow')
|
||||||
menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'episode')
|
menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'tvshow')
|
||||||
menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'episode')
|
menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'tvshow')
|
||||||
menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'episode')
|
menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'tvshow')
|
||||||
menu(itemlist, 'Cerca...', 'search', contentType='search')
|
menu(itemlist, 'Cerca...', 'search', contentType='search')
|
||||||
aplay(item, itemlist, list_servers, list_quality)
|
aplay(item, itemlist, list_servers, list_quality)
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -46,10 +46,10 @@ def newest(categoria):
|
|||||||
item.contentType = 'movie'
|
item.contentType = 'movie'
|
||||||
item.url = host + '/film/'
|
item.url = host + '/film/'
|
||||||
elif categoria == "series":
|
elif categoria == "series":
|
||||||
item.contentType = 'episode'
|
item.contentType = 'tvshow'
|
||||||
item.url = host + '/serie/'
|
item.url = host + '/serie/'
|
||||||
elif categoria == "anime":
|
elif categoria == "anime":
|
||||||
item.contentType = 'episode'
|
item.contentType = 'tvshow'
|
||||||
item.url = host + '/anime/'
|
item.url = host + '/anime/'
|
||||||
|
|
||||||
item.action = "peliculas"
|
item.action = "peliculas"
|
||||||
@@ -88,19 +88,19 @@ def search(item, texto):
|
|||||||
|
|
||||||
def peliculas_src(item):
|
def peliculas_src(item):
|
||||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||||
|
|
||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
if item.contentType == 'movie':
|
if item.contentType == 'movie':
|
||||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div><span class="quality">([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<div'
|
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div><span class="quality">([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<div'
|
||||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'quality', 'title', 'year', 'plot'], headers, patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'quality', 'title', 'year', 'plot'], headers, patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||||
elif item.contentType == 'episode':
|
elif item.contentType == 'tvshow':
|
||||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?<div class="texto">([^<]+)'
|
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?<div class="texto">([^<]+)'
|
||||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||||
else:
|
else:
|
||||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||||
|
|
||||||
def newep(item):
|
def newep(item):
|
||||||
log()
|
log()
|
||||||
|
|||||||
+2
-2
@@ -33,7 +33,7 @@ def mainlist(item):
|
|||||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie-tv-streaming', 'tvshow')
|
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie-tv-streaming', 'tvshow')
|
||||||
menu(itemlist, 'Per Genere submenu', 'genre', host, 'tvshow', 'TV')
|
menu(itemlist, 'Per Genere submenu', 'genre', host, 'tvshow', 'TV')
|
||||||
menu(itemlist, 'Per Nazione submenu', 'nation', host + '/serie-tv-streaming/', 'tvshow', 'TV')
|
menu(itemlist, 'Per Nazione submenu', 'nation', host + '/serie-tv-streaming/', 'tvshow', 'TV')
|
||||||
menu(itemlist, 'Cerca...', 'search', contentType='episode', args='TV')
|
menu(itemlist, 'Cerca...', 'search', contentType='tvshow', args='TV')
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
@@ -96,7 +96,7 @@ def nation(item):
|
|||||||
|
|
||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
item.contentType = 'episode'
|
item.contentType = 'tvshow'
|
||||||
return support.scrape(item,r'<h2>(.*?)</h2>\s*<img src="([^"]+)" alt="[^"]*" />\s*<A HREF="([^"]+)">.*?<span class="year">([0-9]{4}).*?<span class="calidad">([A-Z]+)',['title', 'thumb', 'url', 'year', 'quality'], headers, patronNext=r"<span class='current'>\d+</span><a rel='nofollow' class='page larger' href='([^']+)'>\d+</a>", action='episodios')
|
return support.scrape(item,r'<h2>(.*?)</h2>\s*<img src="([^"]+)" alt="[^"]*" />\s*<A HREF="([^"]+)">.*?<span class="year">([0-9]{4}).*?<span class="calidad">([A-Z]+)',['title', 'thumb', 'url', 'year', 'quality'], headers, patronNext=r"<span class='current'>\d+</span><a rel='nofollow' class='page larger' href='([^']+)'>\d+</a>", action='episodios')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-6
@@ -206,6 +206,8 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
|||||||
if scraped['type'] in variants:
|
if scraped['type'] in variants:
|
||||||
action = name
|
action = name
|
||||||
|
|
||||||
|
if inspect.stack()[1][3] == 'episodios': item.contentType = 'episode'
|
||||||
|
|
||||||
if scraped["title"] not in blacklist:
|
if scraped["title"] not in blacklist:
|
||||||
it = Item(
|
it = Item(
|
||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
@@ -575,12 +577,6 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True):
|
|||||||
CL = get_setting('checklinks') or get_setting('checklinks', item.channel)
|
CL = get_setting('checklinks') or get_setting('checklinks', item.channel)
|
||||||
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
||||||
channel_node = autoplay_node.get(item.channel, {})
|
channel_node = autoplay_node.get(item.channel, {})
|
||||||
if not channel_node: # non ha mai aperto il menu del canale quindi in autoplay_data.json non c'e la key
|
|
||||||
channelFile = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
|
||||||
autoplay.init(item.channel, channelFile.list_servers, channelFile.list_quality)
|
|
||||||
|
|
||||||
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
|
||||||
channel_node = autoplay_node.get(item.channel, {})
|
|
||||||
settings_node = channel_node.get('settings', {})
|
settings_node = channel_node.get('settings', {})
|
||||||
AP = get_setting('autoplay') or settings_node['active']
|
AP = get_setting('autoplay') or settings_node['active']
|
||||||
|
|
||||||
|
|||||||
@@ -604,27 +604,29 @@ def set_context_commands(item, parent_item):
|
|||||||
from_channel=item.channel, from_action=item.action)
|
from_channel=item.channel, from_action=item.action)
|
||||||
.tourl())))
|
.tourl())))
|
||||||
|
|
||||||
elif item.contentSerieName:
|
# elif item.contentSerieName:
|
||||||
# Descargar serie
|
# Descargar serie
|
||||||
if item.contentType == "tvshow" or 'episode' and item.action in ["episodios"]:
|
elif item.contentType == "tvshow" and item.action in ["episodios"]:
|
||||||
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
item.contentType == "tvshow"
|
||||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
context_commands.append((config.get_localized_string(60355), "XBMC.RunPlugin(%s?%s)" %
|
||||||
from_channel=item.channel,
|
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||||
from_action=item.action).tourl())))
|
from_channel=item.channel,
|
||||||
|
from_action=item.action).tourl())))
|
||||||
|
|
||||||
# Descargar episodio
|
# Descargar episodio
|
||||||
elif item.contentType == "tvshow" or 'episode' and item.action in ["findvideos"]:
|
elif item.contentType == 'episode' and item.action in ["findvideos"]:
|
||||||
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" %
|
item.contentType == "episode"
|
||||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
context_commands.append((config.get_localized_string(60356), "XBMC.RunPlugin(%s?%s)" %
|
||||||
from_channel=item.channel,
|
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||||
from_action=item.action).tourl())))
|
from_channel=item.channel,
|
||||||
|
from_action=item.action).tourl())))
|
||||||
|
|
||||||
# Descargar temporada
|
# Descargar temporada
|
||||||
elif item.contentType == "season":
|
elif item.contentType == "season":
|
||||||
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
context_commands.append((config.get_localized_string(60357), "XBMC.RunPlugin(%s?%s)" %
|
||||||
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
(sys.argv[0], item.clone(channel="downloads", action="save_download",
|
||||||
from_channel=item.channel,
|
from_channel=item.channel,
|
||||||
from_action=item.action).tourl())))
|
from_action=item.action).tourl())))
|
||||||
|
|
||||||
# Abrir configuración
|
# Abrir configuración
|
||||||
if parent_item.channel not in ["setting", "news", "search"]:
|
if parent_item.channel not in ["setting", "news", "search"]:
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ msgid "Sagas"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#50001"
|
msgctxt "#50001"
|
||||||
msgid "Today on TV"
|
msgid "On Air"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#50002"
|
msgctxt "#50002"
|
||||||
|
|||||||
@@ -378,8 +378,8 @@ msgid "Sagas"
|
|||||||
msgstr "Saghe"
|
msgstr "Saghe"
|
||||||
|
|
||||||
msgctxt "#50001"
|
msgctxt "#50001"
|
||||||
msgid "Today on TV"
|
msgid "On Air"
|
||||||
msgstr "Oggi in TV"
|
msgstr "Adesso in onda"
|
||||||
|
|
||||||
msgctxt "#50002"
|
msgctxt "#50002"
|
||||||
msgid "Latest News"
|
msgid "Latest News"
|
||||||
@@ -3935,7 +3935,7 @@ msgstr "Film più valutati"
|
|||||||
|
|
||||||
msgctxt "#70309"
|
msgctxt "#70309"
|
||||||
msgid "Movies Now in Theatres "
|
msgid "Movies Now in Theatres "
|
||||||
msgstr "Film ora in sala"
|
msgstr "[Film] Ora in sala"
|
||||||
|
|
||||||
msgctxt "#70310"
|
msgctxt "#70310"
|
||||||
msgid "Series by Genre"
|
msgid "Series by Genre"
|
||||||
@@ -3947,7 +3947,7 @@ msgstr "Serie più popolari"
|
|||||||
|
|
||||||
msgctxt "#70312"
|
msgctxt "#70312"
|
||||||
msgid "Series in progress"
|
msgid "Series in progress"
|
||||||
msgstr "Serie in uscita"
|
msgstr "[Serie TV] In corso"
|
||||||
|
|
||||||
msgctxt "#70313"
|
msgctxt "#70313"
|
||||||
msgid "Top rated Series"
|
msgid "Top rated Series"
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ def download_from_server(item):
|
|||||||
unsupported_servers = ["torrent"]
|
unsupported_servers = ["torrent"]
|
||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server)
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70178) % item.server)
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
channel = __import__(item.contentChannel, None, None, [item.contentChannel])
|
||||||
if hasattr(channel, "play") and not item.play_menu:
|
if hasattr(channel, "play") and not item.play_menu:
|
||||||
|
|
||||||
progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel)
|
progreso.update(50, config.get_localized_string(70178) % item.server, config.get_localized_string(60003) % item.contentChannel)
|
||||||
@@ -570,7 +570,7 @@ def download_from_best_server(item):
|
|||||||
result = {"downloadStatus": STATUS_CODES.error}
|
result = {"downloadStatus": STATUS_CODES.error}
|
||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70179))
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
channel = __import__(item.contentChannel, None, None, [item.contentChannel])
|
||||||
|
|
||||||
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
progreso.update(50, config.get_localized_string(70184), config.get_localized_string(70180) % item.contentChannel)
|
||||||
|
|
||||||
@@ -648,7 +648,6 @@ def select_server(item):
|
|||||||
def start_download(item):
|
def start_download(item):
|
||||||
logger.info(
|
logger.info(
|
||||||
"contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url))
|
"contentAction: %s | contentChannel: %s | url: %s" % (item.contentAction, item.contentChannel, item.url))
|
||||||
|
|
||||||
# Ya tenemnos server, solo falta descargar
|
# Ya tenemnos server, solo falta descargar
|
||||||
if item.contentAction == "play":
|
if item.contentAction == "play":
|
||||||
ret = download_from_server(item)
|
ret = download_from_server(item)
|
||||||
@@ -671,13 +670,13 @@ def start_download(item):
|
|||||||
def get_episodes(item):
|
def get_episodes(item):
|
||||||
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (
|
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (
|
||||||
item.contentAction, item.contentChannel, item.contentType))
|
item.contentAction, item.contentChannel, item.contentType))
|
||||||
|
|
||||||
# El item que pretendemos descargar YA es un episodio
|
# El item que pretendemos descargar YA es un episodio
|
||||||
if item.contentType == "episode":
|
if item.contentType == "episode":
|
||||||
episodes = [item.clone()]
|
episodes = [item.clone()]
|
||||||
|
|
||||||
# El item es uma serie o temporada
|
# El item es uma serie o temporada
|
||||||
elif item.contentType in ["tvshow", "season"]:
|
if item.contentType in ["tvshow", "season"]:
|
||||||
# importamos el canal
|
# importamos el canal
|
||||||
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
channel = __import__('channels.%s' % item.contentChannel, None, None, ["channels.%s" % item.contentChannel])
|
||||||
# Obtenemos el listado de episodios
|
# Obtenemos el listado de episodios
|
||||||
@@ -721,7 +720,6 @@ def get_episodes(item):
|
|||||||
|
|
||||||
episode.downloadFilename = filetools.validate_path(os.path.join(item.downloadFilename, "%dx%0.2d - %s" % (
|
episode.downloadFilename = filetools.validate_path(os.path.join(item.downloadFilename, "%dx%0.2d - %s" % (
|
||||||
episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip())))
|
episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip())))
|
||||||
|
|
||||||
itemlist.append(episode)
|
itemlist.append(episode)
|
||||||
# Cualquier otro resultado no nos vale, lo ignoramos
|
# Cualquier otro resultado no nos vale, lo ignoramos
|
||||||
else:
|
else:
|
||||||
@@ -758,8 +756,8 @@ def save_download(item):
|
|||||||
|
|
||||||
# Menu contextual
|
# Menu contextual
|
||||||
if item.from_action and item.from_channel:
|
if item.from_action and item.from_channel:
|
||||||
item.channel = item.from_channel
|
item.channel = str(item.from_channel)
|
||||||
item.action = item.from_action
|
item.action = str(item.from_action)
|
||||||
del item.from_action
|
del item.from_action
|
||||||
del item.from_channel
|
del item.from_channel
|
||||||
|
|
||||||
@@ -827,6 +825,7 @@ def save_download_tvshow(item):
|
|||||||
|
|
||||||
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70188))
|
progreso = platformtools.dialog_progress(config.get_localized_string(30101), config.get_localized_string(70188))
|
||||||
|
|
||||||
|
item.show = item.fulltitle
|
||||||
scraper.find_and_set_infoLabels(item)
|
scraper.find_and_set_infoLabels(item)
|
||||||
|
|
||||||
item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.contentChannel))
|
item.downloadFilename = filetools.validate_path("%s [%s]" % (item.contentSerieName, item.contentChannel))
|
||||||
|
|||||||
+13
-8
@@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import urllib
|
import urllib
|
||||||
|
from channelselector import get_thumb
|
||||||
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
|
from platformcode import logger, config
|
||||||
|
|
||||||
host = "https://www.comingsoon.it"
|
host = "https://www.comingsoon.it"
|
||||||
|
|
||||||
@@ -18,28 +18,33 @@ TIMEOUT_TOTAL = 60
|
|||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info(" mainlist")
|
logger.info(" mainlist")
|
||||||
itemlist = [Item(channel=item.channel,
|
itemlist = [Item(channel="search", action='discover_list', title=config.get_localized_string(70309),
|
||||||
title=support.typo("IN ONDA ADESSO bold"),
|
search_type='list', list_type='movie/now_playing',
|
||||||
|
thumbnail=get_thumb("now_playing.png")),
|
||||||
|
Item(channel="search", action='discover_list', title=config.get_localized_string(70312),
|
||||||
|
search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")),
|
||||||
|
Item(channel=item.channel,
|
||||||
|
title="[Oggi in TV] [B]Adesso in onda[/B]",
|
||||||
action="tvoggi",
|
action="tvoggi",
|
||||||
url="%s/filmtv/" % host,
|
url="%s/filmtv/" % host,
|
||||||
thumbnail=item.thumbnail),
|
thumbnail=item.thumbnail),
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="Mattina",
|
title="[Oggi in TV] Mattina",
|
||||||
action="tvoggi",
|
action="tvoggi",
|
||||||
url="%s/filmtv/oggi/mattina/" % host,
|
url="%s/filmtv/oggi/mattina/" % host,
|
||||||
thumbnail=item.thumbnail),
|
thumbnail=item.thumbnail),
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="Pomeriggio",
|
title="[Oggi in TV] Pomeriggio",
|
||||||
action="tvoggi",
|
action="tvoggi",
|
||||||
url="%s/filmtv/oggi/pomeriggio/" % host,
|
url="%s/filmtv/oggi/pomeriggio/" % host,
|
||||||
thumbnail=item.thumbnail),
|
thumbnail=item.thumbnail),
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="Sera",
|
title="[Oggi in TV] Sera",
|
||||||
action="tvoggi",
|
action="tvoggi",
|
||||||
url="%s/filmtv/oggi/sera/" % host,
|
url="%s/filmtv/oggi/sera/" % host,
|
||||||
thumbnail=item.thumbnail),
|
thumbnail=item.thumbnail),
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="Notte",
|
title="[Oggi in TV] Notte",
|
||||||
action="tvoggi",
|
action="tvoggi",
|
||||||
url="%s/filmtv/oggi/notte/" % host,
|
url="%s/filmtv/oggi/notte/" % host,
|
||||||
thumbnail=item.thumbnail)]
|
thumbnail=item.thumbnail)]
|
||||||
|
|||||||
+8
-21
@@ -29,43 +29,30 @@ def mainlist(item):
|
|||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
context = [{"title": config.get_localized_string(60412), "action": "setting_channel", "channel": item.channel}]
|
context = [{"title": config.get_localized_string(60412), "action": "setting_channel", "channel": item.channel}]
|
||||||
itemlist.append(Item(channel=item.channel, action="sub_menu", title=config.get_localized_string(70305), context=context,
|
itemlist.append(Item(channel=item.channel, action="sub_menu", title="[B]" + config.get_localized_string(70305)+ "[/B]", context=context,
|
||||||
thumbnail=get_thumb("search.png")))
|
thumbnail=get_thumb("search.png")))
|
||||||
|
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
|
||||||
|
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails"))
|
||||||
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70306), type='movie',
|
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70306), type='movie',
|
||||||
thumbnail=get_thumb("genres.png")))
|
thumbnail=get_thumb("genres.png")))
|
||||||
|
|
||||||
itemlist.append (Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70307),
|
itemlist.append (Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70307),
|
||||||
context=context, search_type='list', list_type='movie/popular',
|
context=context, search_type='list', list_type='movie/popular',
|
||||||
thumbnail=get_thumb("popular.png")))
|
thumbnail=get_thumb("popular.png")))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70308),
|
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70308),
|
||||||
context=context, search_type='list', list_type='movie/top_rated',
|
context=context, search_type='list', list_type='movie/top_rated',
|
||||||
thumbnail=get_thumb("top_rated.png")))
|
thumbnail=get_thumb("top_rated.png")))
|
||||||
|
#itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70309), context=context,
|
||||||
itemlist.append(
|
# search_type='list', list_type='movie/now_playing',
|
||||||
Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70309), context=context,
|
# thumbnail=get_thumb("now_playing.png")))
|
||||||
search_type='list', list_type='movie/now_playing',
|
|
||||||
thumbnail=get_thumb("now_playing.png")))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70310), type='tv',
|
itemlist.append(Item(channel=item.channel, action='genres_menu', title=config.get_localized_string(70310), type='tv',
|
||||||
thumbnail=get_thumb("genres.png")))
|
thumbnail=get_thumb("genres.png")))
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70311), context=context,
|
Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70311), context=context,
|
||||||
search_type='list',list_type='tv/popular', thumbnail=get_thumb("popular.png")))
|
search_type='list',list_type='tv/popular', thumbnail=get_thumb("popular.png")))
|
||||||
|
#itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70312), context=context,
|
||||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70312), context=context,
|
# search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")))
|
||||||
search_type='list', list_type='tv/on_the_air', thumbnail=get_thumb("on_the_air.png")))
|
|
||||||
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70313), context=context,
|
itemlist.append(Item(channel=item.channel, action='discover_list', title=config.get_localized_string(70313), context=context,
|
||||||
search_type='list', list_type='tv/top_rated', thumbnail=get_thumb("top_rated.png")))
|
search_type='list', list_type='tv/top_rated', thumbnail=get_thumb("top_rated.png")))
|
||||||
|
|
||||||
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
|
|
||||||
thumbnail=get_thumb("on_the_air.png"), viewmode="thumbnails"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Reference in New Issue
Block a user