diff --git a/channels/animeworld.py b/channels/animeworld.py index d2d5fb0e..dbea46f0 100644 --- a/channels/animeworld.py +++ b/channels/animeworld.py @@ -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' 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