Skip to content

Commit

Permalink
changed to rsplit for audiofiles to be robust against . in filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
max-mauermann committed Sep 3, 2024
1 parent 4685bf6 commit be11b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be11b81

Please sign in to comment.