From 62c426522f000bc4afa200a1c84303132a9b2701 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 4 Apr 2022 15:31:51 -0400 Subject: [PATCH] [6] use english names --- VERSION | 2 +- modules/logs.py | 4 +++- modules/meta.py | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index d923b25c..cbb09b25 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.3-develop5 +1.16.3-develop6 diff --git a/modules/logs.py b/modules/logs.py index acd5608e..a0a5319c 100644 --- a/modules/logs.py +++ b/modules/logs.py @@ -1,4 +1,4 @@ -import io, logging, os, sys, traceback +import io, logging, os, re, sys, traceback from logging.handlers import RotatingFileHandler LOG_DIR = "logs" @@ -218,6 +218,8 @@ class MyLogger: for secret in self.secrets: if secret in msg: msg = msg.replace(secret, "(redacted)") + if "HTTPConnectionPool" in msg: + msg = re.sub("HTTPConnectionPool\\((.*?)\\)", "HTTPConnectionPool(redacted)", msg) try: if not _srcfile: raise ValueError diff --git a/modules/meta.py b/modules/meta.py index 565eb48c..20ab932d 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -315,7 +315,15 @@ class MetadataFile(DataFile): tags = library.get_tags(f"episode.{search_tag}") else: tags = library.get_tags(search_tag) - if auto_type in ["resolution", "decade", "subtitle_language", "audio_language"]: + if auto_type in ["subtitle_language", "audio_language"]: + all_keys = [] + auto_list = {} + for i in tags: + all_keys.append(str(i.key)) + final_title = self.config.TMDb.TMDb._iso_639_1[str(i.key)].english_name if str(i.key) in self.config.TMDb.TMDb._iso_639_1 else str(i.title) + if all([x not in exclude for x in [final_title, str(i.title), str(i.key)]]): + auto_list[str(i.key)] = final_title + elif auto_type in ["resolution", "decade"]: all_keys = [str(i.key) for i in tags] auto_list = {str(i.key): i.title for i in tags if str(i.title) not in exclude and str(i.key) not in exclude} else: