- completato il supporto al futuro Kodi 19\n- ridisegnato infoplus\n- fix vari ed eventuali\n
This commit is contained in:
marco
2020-09-29 21:08:25 +02:00
parent d153ac5918
commit 8a8d1e4f5e
195 changed files with 20697 additions and 23038 deletions
+10 -10
View File
@@ -205,7 +205,7 @@ def save_movie(item, silent=False):
logger.error(traceback.format_exc())
if filetools.write(json_path, item.tojson()):
if not silent: p_dialog.update(100, config.get_localized_string(60062), item.contentTitle)
if not silent: p_dialog.update(100, item.contentTitle)
item_nfo.library_urls[item.channel] = item.url
if filetools.write(nfo_path, head_nfo + item_nfo.tojson()):
@@ -221,7 +221,7 @@ def save_movie(item, silent=False):
# If we get to this point it is because something has gone wrong
logger.error("Could not save %s in the video library" % item.contentTitle)
if not silent:
p_dialog.update(100, config.get_localized_string(60063), item.contentTitle)
p_dialog.update(100, item.contentTitle)
p_dialog.close()
return 0, 0, -1, path
@@ -254,7 +254,7 @@ def add_renumber_options(item, head_nfo, path):
return ret
def check_renumber_options(item):
from specials.autorenumber import load, write
from platformcode.autorenumber import load, write
for key in item.channel_prefs:
if 'TVSHOW_AUTORENUMBER' in item.channel_prefs[key]:
item.channel = key
@@ -645,10 +645,10 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
# Silent is to show no progress (for service)
if not silent:
# progress dialog
p_dialog = platformtools.dialog_progress(config.get_localized_string(20000), config.get_localized_string(60064))
p_dialog.update(0, config.get_localized_string(60065))
p_dialog = platformtools.dialog_progress(config.get_localized_string(60064) ,'')
# p_dialog.update(0, config.get_localized_string(60065))
channel_alt = serie.channels # We prepare to add the emergency urls
channel_alt = serie.channel # We prepare to add the emergency urls
emergency_urls_stat = config.get_setting("emergency_urls", channel_alt) # Does the channel want emergency urls?
emergency_urls_succ = False
try: channel = __import__('specials.%s' % channel_alt, fromlist=["specials.%s" % channel_alt])
@@ -673,7 +673,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
json_path = filetools.join(path, ("%s [%s].json" % (season_episode, e.channel)).lower()) # Path of the episode .json
if emergency_urls_stat == 1 and not e.emergency_urls and e.contentType == 'episode': # Do we keep emergency urls?
if not silent:
p_dialog.update(0, 'Caching links and .torren filest...', e.title) # progress dialog
p_dialog.update(0, 'Caching links and .torren filest...\n' + e.title) # progress dialog
if json_path in ficheros: # If there is the .json we get the urls from there
if overwrite: # but only if .json are overwritten
json_epi = Item().fromjson(filetools.read(json_path)) #We read the .json
@@ -690,7 +690,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
emergency_urls_succ = True # ... is a success and we are going to mark the .nfo
elif emergency_urls_stat == 3 and e.contentType == 'episode': # Do we update emergency urls?
if not silent:
p_dialog.update(0, 'Caching links and .torrent files...', e.title) # progress dialog
p_dialog.update(0, 'Caching links and .torrent files...\n' + e.title) # progress dialog
e = emergency_urls(e, channel, json_path, headers=headers) # we generate the urls
if e.emergency_urls: # If we already have urls...
emergency_urls_succ = True # ... is a success and we are going to mark the .nfo
@@ -722,7 +722,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
t = 0
for i, e in enumerate(scraper.sort_episode_list(new_episodelist)):
if not silent:
p_dialog.update(int(math.ceil((i + 1) * t)), config.get_localized_string(60064), e.title)
p_dialog.update(int(math.ceil((i + 1) * t)), e.title)
high_sea = e.contentSeason
high_epi = e.contentEpisodeNumber
@@ -1073,7 +1073,7 @@ def add_tvshow(item, channel=None):
# Get the episode list
itemlist = getattr(channel, item.action)(item)
if itemlist and not scrapertools.find_single_match(itemlist[0].title, r'(\d+x\d+)'):
from specials.autorenumber import select_type, renumber, check
from platformcode.autorenumber import select_type, renumber, check
if not check(item):
action = item.action
select_type(item)