From be11b81191551c82f07495eebabab80e02964815 Mon Sep 17 00:00:00 2001 From: Max Mauermann Date: Tue, 3 Sep 2024 13:18:12 +0200 Subject: [PATCH] changed to rsplit for audiofiles to be robust against . in filenames --- segments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segments.py b/segments.py index 855bc485..53c1e51c 100644 --- a/segments.py +++ b/segments.py @@ -89,7 +89,7 @@ def parseFolders(apath: str, rpath: str, allowed_result_filetypes: list[str] = [ for root, _, files in os.walk(apath): for f in files: if f.rsplit(".", 1)[-1].lower() in cfg.ALLOWED_FILETYPES: - table_key = os.path.join(root.strip(apath), f.split(".", 1)[0]) + table_key = os.path.join(root.strip(apath), f.rsplit(".", 1)[0]) data[table_key] = {"audio": os.path.join(root, f), "result": ""} # Get all result files