From 94fa7570ec100a4fdbc9846526f24fc0af2df2b1 Mon Sep 17 00:00:00 2001 From: Cuan Date: Wed, 16 Mar 2022 20:38:59 -0400 Subject: [PATCH] Fixed transcoding of songs with special characters --- bin/flac2pod | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/flac2pod b/bin/flac2pod index 855ea44..3917799 100755 --- a/bin/flac2pod +++ b/bin/flac2pod @@ -39,8 +39,9 @@ def scan_destination_convert_mp3(): for _file in source_directories[1]: print(_file) if not Path(f"{_file.replace(path.expanduser(source), path.expanduser(destination))}.mp3").is_file(): - system(f"ffmpeg -i '{_file}.flac' -c:v copy -ab 320k -map_metadata 0 -id3v2_version 3 " - f"'{_file.replace(path.expanduser(source), path.expanduser(destination))}.mp3'") + system("ffmpeg -i '" + _file.replace("'", "\\'") + + ".flac' -c:v copy -ab 320k -map_metadata 0 -id3v2_version 3 '" + + _file.replace(path.expanduser(source), path.expanduser(destination)).replace("'", "\\'") + ".mp3'") def rg2sc():