[6] use english names

This commit is contained in:
meisnate12 2022-04-04 15:31:51 -04:00
parent cdc6245c35
commit 62c426522f
3 changed files with 13 additions and 3 deletions

View file

@ -1 +1 @@
1.16.3-develop5 1.16.3-develop6

View file

@ -1,4 +1,4 @@
import io, logging, os, sys, traceback import io, logging, os, re, sys, traceback
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler
LOG_DIR = "logs" LOG_DIR = "logs"
@ -218,6 +218,8 @@ class MyLogger:
for secret in self.secrets: for secret in self.secrets:
if secret in msg: if secret in msg:
msg = msg.replace(secret, "(redacted)") msg = msg.replace(secret, "(redacted)")
if "HTTPConnectionPool" in msg:
msg = re.sub("HTTPConnectionPool\\((.*?)\\)", "HTTPConnectionPool(redacted)", msg)
try: try:
if not _srcfile: if not _srcfile:
raise ValueError raise ValueError

View file

@ -315,7 +315,15 @@ class MetadataFile(DataFile):
tags = library.get_tags(f"episode.{search_tag}") tags = library.get_tags(f"episode.{search_tag}")
else: else:
tags = library.get_tags(search_tag) 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] 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} 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: else: