Fix Errore videolibrarytools

This commit is contained in:
Alhaziel01
2021-02-04 16:53:15 +01:00
parent 3e037fcdb2
commit 5ad6f2d228

View File

@@ -500,9 +500,9 @@ def save_tvshow(item, episodelist, silent=False):
if not filetools.exists(tvshow_path):
# We create tvshow.nfo, if it does not exist, with the head_nfo, series info and watched episode marks
logger.debug("Creating tvshow.nfo: " + tvshow_path)
head_nfo = scraper.get_nfo(item, search_groups=True)
head_nfo = scraper.get_nfo(item, search_groups=True, episodelist=episodelist)
if not head_nfo:
return None, None, None, None
return 0, 0, 0, ''
item.infoLabels['mediatype'] = "tvshow"
item.infoLabels['title'] = item.contentSerieName
item_tvshow = Item(title=item.contentSerieName, channel="videolibrary", action="get_seasons",
@@ -1103,10 +1103,10 @@ def add_tvshow(item, channel=None):
magnet_caching = False
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
if all(val == None for val in [insertados, sobreescritos, fallidos, path]):
return
if not path:
pass
if not insertados and not sobreescritos and not fallidos:
elif not insertados and not sobreescritos and not fallidos:
filetools.rmdirtree(path)
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(60067) % item.show)
logger.error("The string %s could not be added to the video library. Could not get any episode" % item.show)