From 33e79d9c6759c6788b68fe9bd4c3ec053769755a Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 18 Jul 2020 11:19:52 +0200 Subject: [PATCH] Rimuove serie concluse da aggiornamento videoteca --- service.py | 3 +++ specials/videolibrary.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/service.py b/service.py index 70ec7bc5..f1a0f361 100644 --- a/service.py +++ b/service.py @@ -129,6 +129,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': + serie.active = 0 + filetools.write(tvshow_file, head_nfo + serie.tojson()) path = filetools.dirname(tvshow_file) logger.info("serie=" + serie.contentSerieName) diff --git a/specials/videolibrary.py b/specials/videolibrary.py index c42d62bb..d88d85a7 100644 --- a/specials/videolibrary.py +++ b/specials/videolibrary.py @@ -717,9 +717,9 @@ def update_tvshow(item): nfo_path = filetools.join(item.path, "tvshow.nfo") head_nfo, item_nfo = videolibrarytools.read_nfo(nfo_path) if item.active and not item_nfo.active: - if not platformtools.dialog_yesno(config.get_localized_string(60037).replace('...',''), config.get_localized_string(70268) % item.contentSerieName): - item_nfo.active = 1 - filetools.write(nfo_path, head_nfo + item_nfo.tojson()) + # if not platformtools.dialog_yesno(config.get_localized_string(60037).replace('...',''), config.get_localized_string(70268) % item.contentSerieName): + item_nfo.active = 1 + filetools.write(nfo_path, head_nfo + item_nfo.tojson()) platformtools.itemlist_refresh()