From 13fd5e17a95aa914aa4cb9c376beed3173693980 Mon Sep 17 00:00:00 2001 From: axlt2002 Date: Mon, 16 Mar 2020 16:36:12 +0100 Subject: [PATCH 1/2] [videolibrarytools] removed deprecated setting --- core/videolibrarytools.py | 7 +------ specials/videolibrary.json | 23 ----------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/core/videolibrarytools.py b/core/videolibrarytools.py index 04e38173..ed8e01e6 100644 --- a/core/videolibrarytools.py +++ b/core/videolibrarytools.py @@ -571,16 +571,11 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True): new_episodelist = [] # Obtenemos el numero de temporada y episodio y descartamos los q no lo sean - tags = [] - if config.get_setting("enable_filter", "videolibrary"): - tags = [x.strip() for x in config.get_setting("filters", "videolibrary").lower().split(",")] for e in episodelist: headers = {} if e.headers: headers = e.headers - if tags != [] and tags != None and any(tag in e.title.lower() for tag in tags): - continue try: season_episode = scrapertools.get_season_and_episode(e.title) @@ -659,7 +654,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True): json_path = filetools.join(path, ("%s [%s].json" % (season_episode, e.channel)).lower()) if season_episode in nostrm_episodelist: - logger.error('Error in the structure of the Video Library: Seriese ' + serie.contentSerieName + ' ' + season_episode) + logger.info('Skipped: Serie ' + serie.contentSerieName + ' ' + season_episode + ' available as local content') continue strm_exists = strm_path in ficheros nfo_exists = nfo_path in ficheros diff --git a/specials/videolibrary.json b/specials/videolibrary.json index e0b476c5..76b1b3b4 100644 --- a/specials/videolibrary.json +++ b/specials/videolibrary.json @@ -72,29 +72,6 @@ "@60620" ] }, - { - "id": "addition", - "type": "label", - "label": "@70092", - "enabled": true, - "visible": true - }, - { - "id": "enable_filter", - "type": "bool", - "label": "@70090", - "enabled": true, - "visible": true, - "default": false - }, - { - "id": "filters", - "type": "text", - "label": "@70091", - "visible": true, - "enabled": "eq(-1,true)" - }, - { "id": "window_type", "type": "list", From 8caf5a87273dfb38b53d4e5300f163cec7276132 Mon Sep 17 00:00:00 2001 From: axlt2002 Date: Mon, 16 Mar 2020 16:37:37 +0100 Subject: [PATCH 2/2] [scrapertools] regex update + small fix --- core/scrapertools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scrapertools.py b/core/scrapertools.py index c01fecac..e984484c 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -418,14 +418,14 @@ def get_season_and_episode(title): """ filename = "" - patrons = ["(\d+)x(\d+)", "(?:s|t)(\d+)e(\d+)", - "(?:season|temp\w*)\s*(\d+)\s*(?:capitulo|epi\w*)\s*(\d+)"] + patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:[Ss]|[Tt])(\d+)(?:[Ee]|Ep\.)(\d+)", + "(?:[Ss]tag|[Ss]eason|[Ss]tagione\w*)\s*(\d+)\s*(?:[Ee]pi|[Ee]pisode|[Ee]pisodio\w*)\s*(\d+)"] for patron in patrons: try: matches = re.compile(patron, re.I).search(title) if matches: - filename = matches.group(1) + "x" + matches.group(2).zfill(2) + filename = str(int(matches.group(1))) + "x" + str(int(matches.group(2))).zfill(2) break except: pass