Merge branch 'master' of github.com:kodiondemand/addon
This commit is contained in:
@@ -9,8 +9,6 @@ __channel__ = "animeworld"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'Italiano'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['animeworld', 'verystream', 'streamango', 'openload', 'directo']
|
||||
list_quality = ['default', '480p', '720p', '1080p']
|
||||
|
||||
@@ -130,6 +128,15 @@ def episodios(item):
|
||||
item.title += support.typo(item.fulltitle,'-- bold')
|
||||
return item
|
||||
action='findvideos'
|
||||
def itemlistHook(itemlist):
|
||||
if len(itemlist) == 0:
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('VVVVID NON SUPPORTATO','bold'),
|
||||
folder=False
|
||||
))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -146,23 +153,32 @@ def findvideos(item):
|
||||
ID = support.scrapertoolsV2.find_single_match(str(block),r'<a data-id="([^"]+)" data-base="' + (number if number else '1') + '"')
|
||||
support.log('ID= ',serverid)
|
||||
if id:
|
||||
dataJson = support.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)
|
||||
videoData +='\n'+json['grabber']
|
||||
|
||||
if serverid == '28':
|
||||
if serverid == '26': # IF VVVVID
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
action="play",
|
||||
title='diretto',
|
||||
quality='',
|
||||
url=json['grabber'],
|
||||
server='directo',
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType=item.contentType,
|
||||
title=support.typo('VVVVID NON SUPPORTATO','bold'),
|
||||
folder=False))
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
dataJson = support.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)
|
||||
videoData +='\n'+json['grabber']
|
||||
|
||||
if serverid == '28':
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
action="play",
|
||||
title='diretto',
|
||||
quality='',
|
||||
url=json['grabber'],
|
||||
server='directo',
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
|
||||
return support.server(item, videoData, itemlist)
|
||||
|
||||
|
||||
@@ -281,8 +281,8 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
|
||||
infoLabels=infolabels,
|
||||
thumbnail=item.thumbnail if function == 'episodios' else scraped["thumb"] ,
|
||||
args=item.args,
|
||||
contentSerieName= title if item.contentType != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||
contentTitle= title if item.contentType == 'movie' else '',
|
||||
contentSerieName= title if item.contentType or CT != 'movie' and function != 'episodios' else item.fulltitle if function == 'episodios' else '',
|
||||
contentTitle= title if item.contentType or CT == 'movie' else '',
|
||||
contentLanguage = lang,
|
||||
ep=episode if episode else ''
|
||||
)
|
||||
@@ -406,16 +406,18 @@ def scrape(func):
|
||||
if action != 'play' and function != 'episodios' and 'patronMenu' not in args:
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
if anime:
|
||||
from specials import autorenumber
|
||||
from specials import autorenumber
|
||||
if anime:
|
||||
if function == 'episodios' or item.action == 'episodios': autorenumber.renumber(itemlist, item, 'bold')
|
||||
else: autorenumber.renumber(itemlist)
|
||||
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item, function=function)
|
||||
if config.get_setting('downloadenabled') and (function == 'episodios' or function == 'finvideos'):
|
||||
download(itemlist, item, function=function)
|
||||
if anime and autorenumber.check(item) == False:
|
||||
pass
|
||||
else:
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item, function=function)
|
||||
if config.get_setting('downloadenabled') and (function == 'episodios' or function == 'finvideos'):
|
||||
download(itemlist, item, function=function)
|
||||
|
||||
if 'patronMenu' in args:
|
||||
itemlist = thumb(itemlist, genre=True)
|
||||
@@ -477,7 +479,10 @@ def dooplay_get_links(item, host):
|
||||
def dooplay_get_episodes(item):
|
||||
item.contentType = "episode"
|
||||
patron = '<li class="mark-[0-9]+">.*?<img.*?(?:data-lazy-)?src="(?P<thumb>[^"]+).*?(?P<episode>[0-9]+ - [0-9]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+).*?(?P<year>[0-9]{4})'
|
||||
# debug = True
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
return videolibrary(itemlist, item, function='episodios')
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@@ -3291,7 +3291,7 @@ msgstr "Serie"
|
||||
|
||||
msgctxt "#70137"
|
||||
msgid "Movies"
|
||||
msgstr "Films"
|
||||
msgstr "Film"
|
||||
|
||||
msgctxt "#70138"
|
||||
msgid "Low Rating"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
enable="eq(-1,False)+eq(-2,True"/>
|
||||
<setting id="category" type="labelenum" label="70124"
|
||||
lvalues="70137|30123|30124|60513"
|
||||
default="70137" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/>
|
||||
default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/>
|
||||
</category>
|
||||
<category label="70126">
|
||||
<setting id="icon_set" type="labelenum" label="70108" values="default|light|dark|alfa|mike" default="default"/>
|
||||
|
||||
@@ -10,11 +10,11 @@ USO:
|
||||
|
||||
3) Aggiungere le seguinti stringhe nel json del canale (per attivare la configurazione di autonumerazione del canale)
|
||||
{
|
||||
"id": "autorenumber",
|
||||
"type": "bool",
|
||||
"label": "@70712",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "autorenumber",
|
||||
"type": "bool",
|
||||
"label": "@70712",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
@@ -72,7 +72,7 @@ def semiautomatic_config_item(item):
|
||||
item.channel = item.from_channel
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
title = item.show
|
||||
|
||||
|
||||
# Trova l'ID dellla serie
|
||||
while not item.infoLabels['tvdb_id']:
|
||||
try:
|
||||
@@ -83,7 +83,7 @@ def semiautomatic_config_item(item):
|
||||
info = platformtools.dialog_numeric(0, heading)
|
||||
item.infoLabels['tvdb_id'] = '0' if info == '' else info
|
||||
|
||||
|
||||
|
||||
if item.infoLabels['tvdb_id']:
|
||||
ID = item.infoLabels['tvdb_id']
|
||||
dict_renumerate = {TAG_ID: ID}
|
||||
@@ -101,7 +101,7 @@ def semiautomatic_config_item(item):
|
||||
heading = config.get_localized_string(70686) # <- Enter the number of the starting season (for season 1)
|
||||
season = platformtools.dialog_numeric(0, heading, '1')
|
||||
dict_renumerate[TAG_SEASON] = season
|
||||
|
||||
|
||||
########### PROVVISORIO ###################
|
||||
mode = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70688), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
if mode == 1:
|
||||
@@ -119,7 +119,7 @@ def semiautomatic_config_item(item):
|
||||
# Richede se ci sono speciali nella stagione
|
||||
# mode = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70688), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
# if mode == 0: dict_renumerate[TAG_MODE] = False
|
||||
# else:
|
||||
# else:
|
||||
# select = platformtools.dialog_yesno(config.get_localized_string(70687), config.get_localized_string(70717), nolabel=config.get_localized_string(30023), yeslabel=config.get_localized_string(30022))
|
||||
# if select == 0:
|
||||
# dict_renumerate[TAG_MODE] = False
|
||||
@@ -146,7 +146,7 @@ def semiautomatic_config_item(item):
|
||||
message = config.get_localized_string(60444)
|
||||
heading = item.show.strip()
|
||||
platformtools.dialog_notification(heading, message)
|
||||
|
||||
|
||||
|
||||
|
||||
def config_item(item, itemlist=[], typography='', active=False):
|
||||
@@ -157,15 +157,15 @@ def config_item(item, itemlist=[], typography='', active=False):
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
try: ID = dict_series[item.show.rstrip()][TAG_ID]
|
||||
except: ID = ''
|
||||
|
||||
# Pulizia del Titolo
|
||||
|
||||
# Pulizia del Titolo
|
||||
if any( word in title.lower() for word in ['specials', 'speciali']):
|
||||
item.show = re.sub(r'\sspecials|\sspeciali', '', item.show.lower())
|
||||
log('ITEM SHOW= ',item.show)
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
elif not item.infoLabels['tvdb_id']:
|
||||
item.show = title.rstrip('123456789 ')
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
tvdb.find_and_set_infoLabels(item)
|
||||
|
||||
if not ID and active:
|
||||
if item.infoLabels['tvdb_id']:
|
||||
@@ -197,17 +197,17 @@ def renumber(itemlist, item='', typography=''):
|
||||
# Seleziona la funzione Adatta, Menu Contestuale o Rinumerazione
|
||||
if item:
|
||||
settings_node = jsontools.get_node_from_file(item.channel, 'settings')
|
||||
# Controlla se la Serie è già stata rinumerata
|
||||
# Controlla se la Serie è già stata rinumerata
|
||||
|
||||
try:
|
||||
try:
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
TITLE = item.fulltitle.rstrip()
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
|
||||
exist = True
|
||||
|
||||
exist = True
|
||||
except:
|
||||
exist = False
|
||||
|
||||
|
||||
if exist:
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
SEASON = dict_series[TITLE][TAG_SEASON]
|
||||
@@ -225,7 +225,7 @@ def renumber(itemlist, item='', typography=''):
|
||||
dict_series = jsontools.get_node_from_file(itemlist[0].channel, TAG_TVSHOW_RENUMERATE)
|
||||
TITLE = item.show.rstrip()
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
exist = True
|
||||
exist = True
|
||||
except:
|
||||
exist = False
|
||||
if item.contentType != 'movie':
|
||||
@@ -236,7 +236,7 @@ def renumber(itemlist, item='', typography=''):
|
||||
else:
|
||||
item.show = TITLE
|
||||
item.context = context(exist)
|
||||
|
||||
|
||||
def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE):
|
||||
log()
|
||||
# Se ID è 0 salta la rinumerazione
|
||||
@@ -249,10 +249,10 @@ def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE,
|
||||
for item in itemlist:
|
||||
number = scrapertoolsV2.find_single_match(item.title, r'\d+')
|
||||
item.title = typo('0x' + number + ' - ', typography) + item.title
|
||||
|
||||
|
||||
|
||||
|
||||
# Usa la lista degli Episodi se esiste nel Json
|
||||
|
||||
|
||||
elif EPISODE:
|
||||
EpisodeDict = json.loads(base64.b64decode(EPISODE))
|
||||
|
||||
@@ -264,7 +264,7 @@ def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE,
|
||||
number = scrapertoolsV2.find_single_match(item.title, r'\d+').lstrip("0")
|
||||
item.title = typo(EpisodeDict[str(number)] + ' - ', typography) + item.title
|
||||
else:
|
||||
make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
|
||||
else:
|
||||
make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
@@ -281,7 +281,7 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
FirstOfSeason= 0
|
||||
try: SPECIAL = dict_series[TITLE][TAG_SPECIAL]
|
||||
except: SPECIAL = []
|
||||
|
||||
|
||||
# Ricava Informazioni da TVDB
|
||||
while exist:
|
||||
data = tvdb.otvdb_global.get_list_episodes(ID,page)
|
||||
@@ -293,7 +293,7 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
EpList.append([episodes['firstAired'], episodes['airedSeason'], episodes['airedEpisodeNumber']])
|
||||
EpList.sort()
|
||||
log(EpList)
|
||||
|
||||
|
||||
# Crea Dizionari per la numerazione
|
||||
if EpList:
|
||||
specials = []
|
||||
@@ -311,7 +311,7 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
regular[ep] = [str(episode[1]) + 'x' + str(episode[2]), str(episode[0]), allep - 1]
|
||||
ep = ep + 1
|
||||
allep = allep + 1
|
||||
|
||||
|
||||
# seleziona l'Episodio di partenza
|
||||
if int(SEASON) > 1:
|
||||
for numbers, data in regular.items():
|
||||
@@ -322,7 +322,7 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
log(SPECIAL)
|
||||
log(complete)
|
||||
log(regular)
|
||||
|
||||
|
||||
addiction = 0
|
||||
for item in itemlist:
|
||||
# Otiene Numerazione Episodi
|
||||
@@ -333,7 +333,7 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
# find = episode + FirstOfSeason
|
||||
# log('FIND= ',find, ' ',str(episode) + ' ' + str(FirstOfSeason))
|
||||
# Crea Dizionario Episodi
|
||||
|
||||
|
||||
# log(episode, ' ', number, ' ', count)
|
||||
if episode == 0:
|
||||
EpisodeDict[str(episode)] = str(complete[regular[FirstOfSeason+1][2]][0])
|
||||
@@ -351,14 +351,14 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
except: EpisodeDict[str(episode)] = '0x0'
|
||||
|
||||
# Aggiunge numerazione agli Episodi
|
||||
|
||||
|
||||
item.title = typo(EpisodeDict[str(episode)] + ' - ', typography) + item.title
|
||||
|
||||
# Scrive Dizionario Episodi sul json
|
||||
EpisodeDict = base64.b64encode(json.dumps(EpisodeDict))
|
||||
dict_series[TITLE][TAG_EPISODE] = EpisodeDict
|
||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||
|
||||
|
||||
else:
|
||||
heading = config.get_localized_string(70704)
|
||||
ID = platformtools.dialog_numeric(0, heading)
|
||||
@@ -370,13 +370,13 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
||||
return make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
||||
|
||||
# return itemlist
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def RepresentsInt(s):
|
||||
# Controllo Numro Stagione
|
||||
log()
|
||||
try:
|
||||
try:
|
||||
int(s)
|
||||
return True
|
||||
except ValueError:
|
||||
@@ -387,3 +387,16 @@ def error(itemlist):
|
||||
heading = itemlist[0].fulltitle.strip()
|
||||
platformtools.dialog_notification(heading, message)
|
||||
return itemlist
|
||||
|
||||
def check(item):
|
||||
try:
|
||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||
TITLE = item.fulltitle.rstrip()
|
||||
ID = dict_series[TITLE][TAG_ID]
|
||||
SEASON = dict_series[TITLE][TAG_SEASON]
|
||||
EPISODE = dict_series[TITLE][TAG_EPISODE]
|
||||
MODE = dict_series[TITLE][TAG_MODE]
|
||||
exist = True
|
||||
except:
|
||||
exist = False
|
||||
return exist
|
||||
|
||||
@@ -85,7 +85,7 @@ def get_start_page():
|
||||
config.get_localized_string(59976): 'latino',
|
||||
config.get_localized_string(70171): 'torrent',
|
||||
}
|
||||
category = dictCategory[config.get_localized_string(config.get_setting("category"))]
|
||||
category = dictCategory[config.get_setting("category")]
|
||||
|
||||
custom_start= config.get_setting("custom_start")
|
||||
#if category != 'definido':
|
||||
|
||||
Reference in New Issue
Block a user