From 934f10682d866054081c9cf1e5a079cac1896595 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Thu, 25 Feb 2021 20:06:33 +0100 Subject: [PATCH] Disattivata disabilitazione automatica aggiornamento serie in videoteca + fix serie aggiornate comunque --- service.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/service.py b/service.py index 61ef35c5..e0f358a9 100644 --- a/service.py +++ b/service.py @@ -131,27 +131,26 @@ def check_for_update(overwrite=True): p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), heading) p_dialog.update(0, '') show_list = [] - show_ep_num = [] + # show_ep_num = [] for path, folders, files in filetools.walk(videolibrarytools.TVSHOWS_PATH): if 'tvshow.nfo' in files: show_list.extend([filetools.join(path, f) for f in files if f == "tvshow.nfo"]) - show_ep_num.append(len([f for f in files if f.endswith('.nfo') and f != 'tvshow.nfo'])) + # show_ep_num.append(len([f for f in files if f.endswith('.nfo') and f != 'tvshow.nfo'])) if show_list: t = float(100) / len(show_list) for i, tvshow_file in enumerate(show_list): head_nfo, serie = videolibrarytools.read_nfo(tvshow_file) - ep_count = show_ep_num[i] + (len(serie.local_episodes_list) if serie.local_episodes_path else 0) - if serie.infoLabels['status'].lower() == 'ended' and \ - ep_count >= serie.infoLabels['number_of_episodes']: - serie.active = 0 - filetools.write(tvshow_file, head_nfo + serie.tojson()) + # ep_count = show_ep_num[i] + (len(serie.local_episodes_list) if serie.local_episodes_path else 0) + # if serie.infoLabels['status'].lower() == 'ended' and \ + # ep_count >= serie.infoLabels['number_of_episodes']: + # serie.active = 0 + # filetools.write(tvshow_file, head_nfo + serie.tojson()) path = filetools.dirname(tvshow_file) logger.debug("serie=" + serie.contentSerieName) - p_dialog.update(int(math.ceil((i + 1) * t)), heading, serie.contentSerieName) # Check the status of the series.library_playcounts of the Series in case it is incomplete try: @@ -179,7 +178,9 @@ def check_for_update(overwrite=True): except: logger.error(traceback.format_exc()) - continue + continue + + p_dialog.update(int(math.ceil((i + 1) * t)), heading, serie.contentSerieName) # Obtain the update date and the next scheduled for this series update_next = serie.update_next