fix: handle non value for post lang

pull/872/head
Callum Leslie 2 years ago committed by GitHub
parent aa660be510
commit 71eca69912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,7 +37,7 @@ def name_normalize(name: str) -> str:
name = re.sub(r"\/", r"", name) name = re.sub(r"\/", r"", name)
lang = settings.config["reddit"]["thread"]["post_lang"] lang = settings.config["reddit"]["thread"]["post_lang"]
if lang != "": if lang:
print_substep("Translating filename...") print_substep("Translating filename...")
translated_name = ts.google(name, to_language = lang) translated_name = ts.google(name, to_language = lang)
return translated_name return translated_name

Loading…
Cancel
Save