Skip to content

Commit

Permalink
Fixes for songs with trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Iturralde authored and Tomas Iturralde committed Feb 21, 2022
1 parent 5a1777a commit 7f82d7f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ Once the script is done it will place the converted song inside the `out` folder
- UI improvements (Program Output section of the UI doesn't work properly).
- CLI version (Low Priority).
- Allow manual overriding of the `.ass` file.

1 change: 1 addition & 0 deletions karaluxer.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ def run(self) -> None:
title_string = kara_data['title'] + (' (TV)' if tv_size else '')
base_name = '{0} - {1}'.format(kara_data['artists'], title_string)
sanitized_base_name = re.sub(VALID_FILENAME_REGEX, '', base_name)
sanitized_base_name = sanitized_base_name.strip()
song_folder = OUTPUT_FOLDER.joinpath(sanitized_base_name)
if song_folder.exists():
self.display_message(self.LVL_WARNING, 'Overwriting existing song.')
Expand Down

0 comments on commit 7f82d7f

Please sign in to comment.