Fix e Migliorie Autorenumber
This commit is contained in:
+19
-12
@@ -115,7 +115,9 @@ def episodios(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
show_id = str(json_file['data'][0]['show_id'])
|
show_id = str(json_file['data'][0]['show_id'])
|
||||||
|
season_id = str(json_file['data'][0]['season_id'])
|
||||||
episodes = []
|
episodes = []
|
||||||
|
support.log('SEASON ID= ',season_id)
|
||||||
for episode in json_file['data']:
|
for episode in json_file['data']:
|
||||||
episodes.append(episode['episodes'])
|
episodes.append(episode['episodes'])
|
||||||
for episode in episodes:
|
for episode in episodes:
|
||||||
@@ -123,20 +125,25 @@ def episodios(item):
|
|||||||
if 'stagione' in key['title'].lower():
|
if 'stagione' in key['title'].lower():
|
||||||
match = support.match(key['title'].encode('ascii', 'replace'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
|
match = support.match(key['title'].encode('ascii', 'replace'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
|
||||||
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
||||||
|
make_item = True
|
||||||
|
elif int(key['season_id']) == int(season_id):
|
||||||
|
title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('ascii', 'replace'),
|
||||||
|
make_item = True
|
||||||
else:
|
else:
|
||||||
title = 'Episodio ' + key['number'].encode('ascii', 'replace') + ' - ' + key['title'],
|
make_item = False
|
||||||
|
if make_item == True:
|
||||||
if type(title) == tuple: title = title[0]
|
if type(title) == tuple: title = title[0]
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
channel = item.channel,
|
channel = item.channel,
|
||||||
title = title,
|
title = title,
|
||||||
fulltitle= item.fulltitle,
|
fulltitle= item.fulltitle,
|
||||||
show= item.show,
|
show= item.show,
|
||||||
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
||||||
action= 'findvideos',
|
action= 'findvideos',
|
||||||
video_id= key['video_id'],
|
video_id= key['video_id'],
|
||||||
contentType = item.contentType
|
contentType = item.contentType
|
||||||
))
|
))
|
||||||
autorenumber.renumber(itemlist, item, 'bold')
|
autorenumber.renumber(itemlist, item, 'bold')
|
||||||
if autorenumber.check(item) == True:
|
if autorenumber.check(item) == True:
|
||||||
support.videolibrary(itemlist,item)
|
support.videolibrary(itemlist,item)
|
||||||
|
|||||||
+1
-1
@@ -346,7 +346,7 @@ def scrape(func):
|
|||||||
typeContentDict = args['type_content_dict'] if 'type_content_dict' in args else {}
|
typeContentDict = args['type_content_dict'] if 'type_content_dict' in args else {}
|
||||||
debug = args['debug'] if 'debug' in args else False
|
debug = args['debug'] if 'debug' in args else False
|
||||||
log('STACK= ', inspect.stack()[1][3])
|
log('STACK= ', inspect.stack()[1][3])
|
||||||
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'manual_renumeration']: pagination = args['pagination'] if args['pagination'] else 20
|
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update']: pagination = args['pagination'] if args['pagination'] else 20
|
||||||
else: pagination = ''
|
else: pagination = ''
|
||||||
lang = args['deflang'] if 'deflang' in args else ''
|
lang = args['deflang'] if 'deflang' in args else ''
|
||||||
pag = item.page if item.page else 1 # pagination
|
pag = item.page if item.page else 1 # pagination
|
||||||
|
|||||||
@@ -5638,25 +5638,25 @@ msgid "Always add the highest quality"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70730"
|
msgctxt "#70730"
|
||||||
msgid ""
|
msgid "Select the renumbering method"
|
||||||
msgstr "Seleziona il metodo di rinumerazione"
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70731"
|
msgctxt "#70731"
|
||||||
msgid ""
|
msgid "Semi-Automatic"
|
||||||
msgstr "Semi-Automatico"
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70732"
|
msgctxt "#70732"
|
||||||
msgid ""
|
msgid "Manual"
|
||||||
msgstr "Manuale"
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70733"
|
msgctxt "#70733"
|
||||||
msgid ""
|
msgid "Enter the Series number"
|
||||||
msgstr "Digita il numero della Serie"
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70734"
|
msgctxt "#70734"
|
||||||
msgid ""
|
msgid "Select Series Episodes"
|
||||||
msgstr "Seleziona gli Episodi della Serie %s"
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70735"
|
msgctxt "#70735"
|
||||||
msgid ""
|
msgid "%s Special Episode Number"
|
||||||
msgstr "Numero dell'Episodio Speciale"
|
msgstr ""
|
||||||
|
|||||||
@@ -5654,9 +5654,9 @@ msgid "Enter the Series number"
|
|||||||
msgstr "Digita il numero della Serie"
|
msgstr "Digita il numero della Serie"
|
||||||
|
|
||||||
msgctxt "#70734"
|
msgctxt "#70734"
|
||||||
msgid "Select Series %s Episodes"
|
msgid "Select Series Episodes"
|
||||||
msgstr "Seleziona gli Episodi della Serie %s"
|
msgstr "Seleziona gli Episodi della Serie"
|
||||||
|
|
||||||
msgctxt "#70735"
|
msgctxt "#70735"
|
||||||
msgid "%s Special Episode Number"
|
msgid "%s Special Episode Number"
|
||||||
msgstr "Numero dell'Episodio Speciale"
|
msgstr "Numero dell'Episodio Speciale %s"
|
||||||
|
|||||||
+114
-61
@@ -32,7 +32,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
xbmcgui = None
|
xbmcgui = None
|
||||||
import xbmc
|
import xbmc
|
||||||
import re, base64, json, os
|
import re, base64, json, os, inspect
|
||||||
from core import jsontools, tvdb, scrapertoolsV2
|
from core import jsontools, tvdb, scrapertoolsV2
|
||||||
from core.support import typo, log, dbg
|
from core.support import typo, log, dbg
|
||||||
from platformcode import config, platformtools, logger
|
from platformcode import config, platformtools, logger
|
||||||
@@ -69,69 +69,91 @@ def context(exist):
|
|||||||
return _context
|
return _context
|
||||||
|
|
||||||
def select_type(item):
|
def select_type(item):
|
||||||
select = platformtools.dialog_select(config.get_localized_string(70730),[config.get_localized_string(70731), config.get_localized_string(70732)])
|
select = platformtools.dialog_select(config.get_localized_string(70730),[typo(config.get_localized_string(70731),'bold'), typo(config.get_localized_string(70732),'bold')])
|
||||||
if select == 0: semiautomatic_config_item(item)
|
if select == 0: semiautomatic_config_item(item)
|
||||||
else: manual_renumeration(item)
|
else: manual_renumeration(item)
|
||||||
|
|
||||||
def manual_renumeration(item):
|
def manual_renumeration(item, modify=False):
|
||||||
log()
|
log()
|
||||||
_list = []
|
_list = []
|
||||||
EpisodeDict = {}
|
if item.from_channel: item.channel = item.from_channel
|
||||||
item.channel = item.from_channel
|
|
||||||
title = item.show if item.show else item.fulltitle
|
title = item.show if item.show else item.fulltitle
|
||||||
|
|
||||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||||
dict_series[title] = {}
|
if not dict_series.has_key(title): dict_series[title] = {}
|
||||||
|
|
||||||
|
if dict_series[title].has_key(TAG_EPISODE) and dict_series[title][TAG_EPISODE]:
|
||||||
|
EpisodeDict = json.loads(base64.b64decode(dict_series[title][TAG_EPISODE]))
|
||||||
|
del dict_series[title][TAG_EPISODE]
|
||||||
|
else: EpisodeDict = {}
|
||||||
|
|
||||||
|
if dict_series[title].has_key(TAG_EPLIST): del dict_series[title][TAG_EPLIST]
|
||||||
|
if dict_series[title].has_key(TAG_MODE): del dict_series[title][TAG_MODE]
|
||||||
|
if dict_series[title].has_key(TAG_CHECK): del dict_series[title][TAG_CHECK]
|
||||||
|
if dict_series[title].has_key(TAG_SEASON): del dict_series[title][TAG_SEASON]
|
||||||
|
if dict_series[title].has_key(TAG_SPECIAL): del dict_series[title][TAG_SPECIAL]
|
||||||
dict_series[title][TAG_TYPE] = 'manual'
|
dict_series[title][TAG_TYPE] = 'manual'
|
||||||
|
|
||||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||||
tvdb.find_and_set_infoLabels(item)
|
if not dict_series[title].has_key(TAG_ID) and not dict_series[title][TAG_ID]:
|
||||||
|
tvdb.find_and_set_infoLabels(item)
|
||||||
|
|
||||||
# Trova l'ID della serie
|
# Trova l'ID della serie
|
||||||
while not item.infoLabels['tvdb_id']:
|
while not item.infoLabels['tvdb_id']:
|
||||||
try:
|
try:
|
||||||
item.show = platformtools.dialog_input(default=item.show, heading=config.get_localized_string(30112)) # <- Enter title to search
|
item.show = platformtools.dialog_input(default=item.show, heading=config.get_localized_string(30112)) # <- Enter title to search
|
||||||
tvdb.find_and_set_infoLabels(item)
|
tvdb.find_and_set_infoLabels(item)
|
||||||
except:
|
except:
|
||||||
heading = config.get_localized_string(70704) # <- TMDB ID (0 to cancel)
|
heading = config.get_localized_string(70704) # <- TMDB ID (0 to cancel)
|
||||||
info = platformtools.dialog_numeric(0, heading)
|
info = platformtools.dialog_numeric(0, heading)
|
||||||
item.infoLabels['tvdb_id'] = '0' if info == '' else info
|
item.infoLabels['tvdb_id'] = '0' if info == '' else info
|
||||||
|
|
||||||
if item.infoLabels['tvdb_id']:
|
if item.infoLabels['tvdb_id']:
|
||||||
ID = item.infoLabels['tvdb_id']
|
ID = item.infoLabels['tvdb_id']
|
||||||
dict_renumerate = {TAG_ID: ID}
|
dict_renumerate = {TAG_ID: ID}
|
||||||
dict_series[title] = dict_renumerate
|
dict_series[title] = dict_renumerate
|
||||||
|
|
||||||
channel = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
# channel = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||||
itemlist = channel.episodios(item)
|
itemlist = get_episodes(item)
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
Title = re.sub(r'\d+x\d+ - ', '', item.title)
|
Title = re.sub(r'\d+x\d+ - ', '', item.title)
|
||||||
if item.action == 'findvideos':
|
if modify == True:
|
||||||
_list.append(Title)
|
ep = int(scrapertoolsV2.find_single_match(Title, r'(\d+)'))
|
||||||
|
if item.action == 'findvideos' and not EpisodeDict.has_key(str(ep)):
|
||||||
|
_list.append(Title)
|
||||||
|
else:
|
||||||
|
if item.action == 'findvideos':
|
||||||
|
_list.append(Title)
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
while len(_list) > 0:
|
while len(_list) > 0:
|
||||||
season = platformtools.dialog_numeric(0, config.get_localized_string(70733))
|
selected = platformtools.dialog_multiselect(config.get_localized_string(70734), _list)
|
||||||
selected = platformtools.dialog_multiselect(config.get_localized_string(70734) % season, _list)
|
|
||||||
if selected == None: break
|
if selected == None: break
|
||||||
|
season = ''
|
||||||
|
while not season:
|
||||||
|
season = platformtools.dialog_numeric(0, config.get_localized_string(70733))
|
||||||
for select in selected:
|
for select in selected:
|
||||||
ep = scrapertoolsV2.find_single_match(_list[select], r'(\d+)')
|
ep = int(scrapertoolsV2.find_single_match(_list[select], r'(\d+)'))
|
||||||
if season == '0':
|
if season == '0':
|
||||||
episode = ''
|
episode = ''
|
||||||
while not episode:
|
while not episode:
|
||||||
episode = platformtools.dialog_numeric(0, config.get_localized_string(70735) % _list[select] )
|
episode = platformtools.dialog_numeric(0, config.get_localized_string(70735) % _list[select] )
|
||||||
EpisodeDict[ep] = '%sx%s' %(season, episode.zfill(2))
|
EpisodeDict[str(ep)] = '%sx%s' %(season, episode.zfill(2))
|
||||||
else:
|
else:
|
||||||
EpisodeDict[ep] = '%sx%s' %(season, str(count).zfill(2))
|
EpisodeDict[str(ep)] = '%sx%s' %(season, str(count).zfill(2))
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
for select in reversed(selected):
|
for select in reversed(selected):
|
||||||
del _list[select]
|
del _list[select]
|
||||||
if len(_list) == 0:
|
|
||||||
EpisodeDict = base64.b64encode(json.dumps(EpisodeDict))
|
|
||||||
dict_series[title][TAG_EPISODE] = EpisodeDict
|
dict_series[title][TAG_TYPE] = 'manual'
|
||||||
else:
|
EpisodeDict = base64.b64encode(json.dumps(EpisodeDict))
|
||||||
dict_series[title] = {}
|
dict_series[title][TAG_EPISODE] = EpisodeDict
|
||||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||||
xbmc.executebuiltin("Container.Refresh")
|
xbmc.executebuiltin("Container.Refresh")
|
||||||
|
if modify == True:
|
||||||
|
return json.loads(base64.b64decode(EpisodeDict))
|
||||||
|
|
||||||
|
|
||||||
def semiautomatic_config_item(item):
|
def semiautomatic_config_item(item):
|
||||||
@@ -176,15 +198,33 @@ def semiautomatic_config_item(item):
|
|||||||
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))
|
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 == True:
|
if mode == True:
|
||||||
dict_renumerate[TAG_MODE] = False
|
dict_renumerate[TAG_MODE] = False
|
||||||
specials = []
|
if dict_series[title].has_key(TAG_SPECIAL):
|
||||||
stop = False
|
specials = dict_renumerate[TAG_SPECIAL]
|
||||||
while not stop:
|
else:
|
||||||
heading = config.get_localized_string(70718) + str(specials)
|
specials = []
|
||||||
special = platformtools.dialog_numeric(0, heading, '')
|
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||||
if special:
|
_list = []
|
||||||
specials.append(int(special))
|
# channel = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||||
dict_renumerate[TAG_SPECIAL] = specials
|
itemlist = get_episodes(item)
|
||||||
else: stop = True
|
for item in itemlist:
|
||||||
|
Title = re.sub(r'\d+x\d+ - ', '', item.title)
|
||||||
|
if item.action == 'findvideos':
|
||||||
|
_list.append(Title)
|
||||||
|
|
||||||
|
selected = platformtools.dialog_multiselect(config.get_localized_string(70734), _list)
|
||||||
|
# if len(selected) > 0:
|
||||||
|
for select in selected:
|
||||||
|
specials.append(int(scrapertoolsV2.find_single_match(_list[select],r'(\d+)')))
|
||||||
|
dict_renumerate[TAG_SPECIAL] = specials
|
||||||
|
|
||||||
|
# stop = False
|
||||||
|
# while not stop:
|
||||||
|
# heading = config.get_localized_string(70718) + str(specials)
|
||||||
|
# special = platformtools.dialog_numeric(0, heading, '')
|
||||||
|
# if special:
|
||||||
|
# specials.append(int(special))
|
||||||
|
# dict_renumerate[TAG_SPECIAL] = specials
|
||||||
|
# else: stop = True
|
||||||
dict_renumerate[TAG_MODE] = False
|
dict_renumerate[TAG_MODE] = False
|
||||||
|
|
||||||
dict_renumerate[TAG_TYPE] = 'auto'
|
dict_renumerate[TAG_TYPE] = 'auto'
|
||||||
@@ -253,14 +293,7 @@ def renumber(itemlist, item='', typography=''):
|
|||||||
item.channel = item.from_channel if item.from_channel else item.channel
|
item.channel = item.from_channel if item.from_channel else item.channel
|
||||||
# Controlla se la Serie è già stata rinumerata
|
# Controlla se la Serie è già stata rinumerata
|
||||||
TITLE = item.fulltitle.rstrip() if item.fulltitle else item.contentTitle
|
TITLE = item.fulltitle.rstrip() if item.fulltitle else item.contentTitle
|
||||||
if dict_series[TITLE].has_key(TAG_TYPE):
|
if inspect.stack()[2][3] == 'get_episodes':
|
||||||
TYPE = dict_series[TITLE][TAG_TYPE]
|
|
||||||
else:
|
|
||||||
TYPE = 'auto'
|
|
||||||
dict_series[TITLE][TAG_TYPE] = TYPE
|
|
||||||
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
|
||||||
|
|
||||||
if TYPE == 'manual':
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
elif dict_series.has_key(TITLE) and dict_series[TITLE].has_key(TAG_ID):
|
elif dict_series.has_key(TITLE) and dict_series[TITLE].has_key(TAG_ID):
|
||||||
@@ -273,7 +306,14 @@ def renumber(itemlist, item='', typography=''):
|
|||||||
if dict_series[TITLE].has_key(TAG_MODE): MODE = dict_series[TITLE][TAG_MODE]
|
if dict_series[TITLE].has_key(TAG_MODE): MODE = dict_series[TITLE][TAG_MODE]
|
||||||
else: MODE = False
|
else: MODE = False
|
||||||
|
|
||||||
renumeration(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE)
|
if dict_series[TITLE].has_key(TAG_TYPE):
|
||||||
|
TYPE = dict_series[TITLE][TAG_TYPE]
|
||||||
|
else:
|
||||||
|
TYPE = 'auto'
|
||||||
|
dict_series[TITLE][TAG_TYPE] = TYPE
|
||||||
|
jsontools.update_node(dict_series, item.channel, TAG_TVSHOW_RENUMERATE)[0]
|
||||||
|
|
||||||
|
renumeration(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE, TYPE)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# se non è stata rinumerata controlla se è attiva la rinumerazione automatica
|
# se non è stata rinumerata controlla se è attiva la rinumerazione automatica
|
||||||
@@ -300,7 +340,7 @@ def renumber(itemlist, item='', typography=''):
|
|||||||
item.show = TITLE
|
item.show = TITLE
|
||||||
item.context = context(exist)
|
item.context = context(exist)
|
||||||
|
|
||||||
def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE):
|
def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE, TITLE, TYPE):
|
||||||
|
|
||||||
# Se ID è 0 salta la rinumerazione
|
# Se ID è 0 salta la rinumerazione
|
||||||
if ID == '0':
|
if ID == '0':
|
||||||
@@ -323,6 +363,8 @@ def renumeration (itemlist, item, typography, dict_series, ID, SEASON, EPISODE,
|
|||||||
# Controlla che la lista egli Episodi sia della stessa lunghezza di Itemlist
|
# Controlla che la lista egli Episodi sia della stessa lunghezza di Itemlist
|
||||||
if EpisodeDict == 'none':
|
if EpisodeDict == 'none':
|
||||||
return error(itemlist)
|
return error(itemlist)
|
||||||
|
if TYPE == 'manual' and len(EpisodeDict) < len(itemlist):
|
||||||
|
EpisodeDict = manual_renumeration(item, True)
|
||||||
if len(EpisodeDict) >= len(itemlist) and EpisodeDict.has_key(scrapertoolsV2.find_single_match(itemlist[0].title, r'\d+')):
|
if len(EpisodeDict) >= len(itemlist) and EpisodeDict.has_key(scrapertoolsV2.find_single_match(itemlist[0].title, r'\d+')):
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
if config.get_localized_string(30992) not in item.title:
|
if config.get_localized_string(30992) not in item.title:
|
||||||
@@ -426,12 +468,19 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE
|
|||||||
EpisodeDict[str(episode)] = str(complete[regular[FirstOfSeason+1][2]][0])
|
EpisodeDict[str(episode)] = str(complete[regular[FirstOfSeason+1][2]][0])
|
||||||
elif addiction < len(SPECIAL):
|
elif addiction < len(SPECIAL):
|
||||||
if episode in SPECIAL:
|
if episode in SPECIAL:
|
||||||
season = complete[regular[count][2]][0]
|
try:
|
||||||
EpisodeDict[str(episode)] = str(complete[regular[count][2]][0]) if season.startswith( '0' ) else '0x' + platformtools.dialog_numeric(0, item.title + '?', '')
|
season = complete[regular[count][2]][0]
|
||||||
|
EpisodeDict[str(episode)] = str(complete[regular[count][2]][0]) if season.startswith( '0' ) else '0x' + platformtools.dialog_numeric(0, item.title + '?', '')
|
||||||
|
|
||||||
|
except:
|
||||||
|
EpisodeDict[str(episode)] = '0x' + platformtools.dialog_numeric(0, item.title + '?', '')
|
||||||
addiction = addiction + 1
|
addiction = addiction + 1
|
||||||
else:
|
elif number <= len(regular):
|
||||||
EpisodeDict[str(episode)] = str(regular[number][0])
|
EpisodeDict[str(episode)] = str(regular[number][0])
|
||||||
elif number <= len(regular):
|
else:
|
||||||
|
try: EpisodeDict[str(episode)] = str(complete[regular[number+2][2]][0])
|
||||||
|
except: EpisodeDict[str(episode)] = '0x0'
|
||||||
|
elif number <= len(regular) and regular.has_key(number):
|
||||||
EpisodeDict[str(episode)] = str(regular[number][0])
|
EpisodeDict[str(episode)] = str(regular[number][0])
|
||||||
else:
|
else:
|
||||||
try: EpisodeDict[str(episode)] = str(complete[regular[number+2][2]][0])
|
try: EpisodeDict[str(episode)] = str(complete[regular[number+2][2]][0])
|
||||||
@@ -479,11 +528,15 @@ def check(item):
|
|||||||
try:
|
try:
|
||||||
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
dict_series = jsontools.get_node_from_file(item.channel, TAG_TVSHOW_RENUMERATE)
|
||||||
TITLE = item.fulltitle.rstrip()
|
TITLE = item.fulltitle.rstrip()
|
||||||
ID = dict_series[TITLE][TAG_ID]
|
dict_series[TITLE][TAG_ID]
|
||||||
SEASON = dict_series[TITLE][TAG_SEASON]
|
dict_series[TITLE][TAG_EPISODE]
|
||||||
EPISODE = dict_series[TITLE][TAG_EPISODE]
|
|
||||||
MODE = dict_series[TITLE][TAG_MODE]
|
|
||||||
exist = True
|
exist = True
|
||||||
except:
|
except:
|
||||||
exist = False
|
exist = False
|
||||||
return exist
|
return exist
|
||||||
|
|
||||||
|
def get_episodes(item):
|
||||||
|
log()
|
||||||
|
ch = __import__('channels.' + item.channel, fromlist=["channels.%s" % item.channel])
|
||||||
|
itemlist = ch.episodios(item)
|
||||||
|
return itemlist
|
||||||
Reference in New Issue
Block a user