From aa02d6a4c4504c5588106f182d13b7ab6b1e8f74 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Fri, 10 Aug 2018 14:31:58 +0200 Subject: [PATCH] Videolibrary.list_tvshows A veces da errores aleatorios, por no encontrar el .nfo. Probablemente problemas de timing --- plugin.video.alfa/channels/videolibrary.py | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/plugin.video.alfa/channels/videolibrary.py b/plugin.video.alfa/channels/videolibrary.py index 0ac027d6..c2927894 100644 --- a/plugin.video.alfa/channels/videolibrary.py +++ b/plugin.video.alfa/channels/videolibrary.py @@ -127,19 +127,24 @@ def list_tvshows(item): pass head_nfo, item_tvshow = videolibrarytools.read_nfo(tvshow_path) - item_tvshow.title = item_tvshow.contentTitle - item_tvshow.path = raiz - item_tvshow.nfo = tvshow_path + try: #A veces da errores aleatorios, por no encontrar el .nfo. Probablemente problemas de timing + item_tvshow.title = item_tvshow.contentTitle + item_tvshow.path = raiz + item_tvshow.nfo = tvshow_path - # Menu contextual: Marcar como visto/no visto - visto = item_tvshow.library_playcounts.get(item_tvshow.contentTitle, 0) - item_tvshow.infoLabels["playcount"] = visto - if visto > 0: - texto_visto = config.get_localized_string(60020) - contador = 0 - else: - texto_visto = config.get_localized_string(60021) - contador = 1 + # Menu contextual: Marcar como visto/no visto + visto = item_tvshow.library_playcounts.get(item_tvshow.contentTitle, 0) + item_tvshow.infoLabels["playcount"] = visto + if visto > 0: + texto_visto = config.get_localized_string(60020) + contador = 0 + else: + texto_visto = config.get_localized_string(60021) + contador = 1 + + except: + logger.error('No encuentra: ' + str(tvshow_path)) + continue # Menu contextual: Buscar automáticamente nuevos episodios o no if item_tvshow.active and int(item_tvshow.active) > 0: