From 1bd39db6f20fa52528059a69c645c1a38571c3f7 Mon Sep 17 00:00:00 2001 From: napuh Date: Wed, 13 Jul 2022 19:47:33 +0200 Subject: [PATCH 1/2] Fix: cutting long file names to avoid errors when saving --- video_creation/final_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 8524051..c7e7fc3 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -29,11 +29,11 @@ def name_normalize(name: str) -> str: name = re.sub(r"(\d+)\s?\/\s?(\d+)", r"\1 of \2", name) name = re.sub(r"(\w+)\s?\/\s?(\w+)", r"\1 or \2", name) name = re.sub(r"\/", r"", name) + name[:70] lang = settings.config["reddit"]["thread"]["post_lang"] if lang: import translators as ts - print_substep("Translating filename...") translated_name = ts.google(name, to_language=lang) return translated_name From d7419cf8e3c3524910c6a33c2fc4c0c2d3ae2dee Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 13 Jul 2022 19:07:42 -0400 Subject: [PATCH 2/2] Update final_video.py --- video_creation/final_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index c7e7fc3..eb42247 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -29,7 +29,7 @@ def name_normalize(name: str) -> str: name = re.sub(r"(\d+)\s?\/\s?(\d+)", r"\1 of \2", name) name = re.sub(r"(\w+)\s?\/\s?(\w+)", r"\1 or \2", name) name = re.sub(r"\/", r"", name) - name[:70] + name[:30] lang = settings.config["reddit"]["thread"]["post_lang"] if lang: