From 4eff61502f7ba6ef9108e4103c1c1c8f18c88bc8 Mon Sep 17 00:00:00 2001 From: jz1 Date: Wed, 20 Mar 2024 18:35:56 +0100 Subject: [PATCH 1/3] Fix for regex filter when language is unknown Fix for when with the regex filter, the language is unknown. It will check now first if its a string. --- modules/plex.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/plex.py b/modules/plex.py index 1e341155..9c6b7915 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -1822,8 +1822,9 @@ class Plex(Library): has_match = False for reg in filter_data: for name in attrs: - if re.compile(reg).search(name): - has_match = True + if isinstance(name, str):: + if re.compile(reg).search(name): + has_match = True if has_match is False: return False elif (not list(set(filter_data) & set(attrs)) and modifier == "") \ From dc19fd29a98d0b9dfd2bef7ac04faa97122a9d6f Mon Sep 17 00:00:00 2001 From: jz1 Date: Wed, 20 Mar 2024 18:48:08 +0100 Subject: [PATCH 2/3] Fix double :: --- modules/plex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plex.py b/modules/plex.py index 9c6b7915..6724b138 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -1822,7 +1822,7 @@ class Plex(Library): has_match = False for reg in filter_data: for name in attrs: - if isinstance(name, str):: + if isinstance(name, str): if re.compile(reg).search(name): has_match = True if has_match is False: From 3bcc3cc829573edf62625e4727ab3175c42b77f4 Mon Sep 17 00:00:00 2001 From: jz1 Date: Thu, 21 Mar 2024 11:44:43 +0100 Subject: [PATCH 3/3] Fix, Check requirements.txt in script dir instead of config When run not on docker, check for requirements.txt from the dir where the script resides instead of the config dir when using --config command for a different directory. --- plex_meta_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 29e8f952..5be0f7cd 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -240,7 +240,7 @@ def start(attrs): required_version = None if not is_docker and not is_linuxserver: try: - with open("requirements.txt", "r") as file: + with open(os.path.abspath(os.path.join(os.path.dirname(__file__), "requirements.txt")), "r") as file: required_version = next(ln.strip()[9:] for ln in file.readlines() if ln.strip().startswith("PlexAPI==")) except FileNotFoundError: logger.error(" File Error: requirements.txt not found")