Rimuove serie concluse da aggiornamento videoteca

This commit is contained in:
Alhaziel01
2020-07-18 11:19:52 +02:00
parent 0df61bcc43
commit 33e79d9c67
2 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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()