From 719d69150b6b7c350492649e18ad2ab3e46ca83b Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 18 Jul 2020 11:49:15 +0200 Subject: [PATCH] Disattiva aggiornamento serie conclusa se: - Serie non ha episodi locali - serie ha episodi locali e corrispondono al totale degli episodi --- service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service.py b/service.py index f1a0f361..12018c8a 100644 --- a/service.py +++ b/service.py @@ -111,6 +111,7 @@ def check_for_update(overwrite=True): update_when_finished = False hoy = datetime.date.today() estado_verify_playcount_series = False + local_ended = True try: if config.get_setting("update", "videolibrary") != 0 or overwrite: @@ -129,7 +130,9 @@ def check_for_update(overwrite=True): for i, tvshow_file in enumerate(show_list): head_nfo, serie = videolibrarytools.read_nfo(tvshow_file) - if serie.infoLabels['status'].lower() == 'ended': + if serie.local_episodes_path: + local_ended = True if serie.infoLabels['number_of_episodes'] == len(serie.local_episodes_list) else False + if serie.infoLabels['status'].lower() == 'ended' and local_ended: serie.active = 0 filetools.write(tvshow_file, head_nfo + serie.tojson()) path = filetools.dirname(tvshow_file)