Fix existing destination file detection

This commit is contained in:
2022-04-24 13:36:34 -04:00
parent be7166e2dd
commit 19a7f3b7b2
+1 -2
View File
@@ -45,8 +45,7 @@ def scan_destination_convert():
for _file in source_directories[1]:
_i_total += 1
_progress = round((_i_total / _total_files) * 100, 2)
if not Path(f"{_file.replace(path.expanduser(source), path.expanduser(destination))}.mp3").is_file() and not \
Path(f"{_file.replace(path.expanduser(source), path.expanduser(destination))}.m4a").is_file():
if not Path(f"{(_file.replace(path.expanduser(source), path.expanduser(destination)))[:-5]}.m4a").is_file():
_file_s = _file.replace(' ', '\\ ').replace("'", "\\'").replace(')', '\\)').replace('(', '\\(')\
.replace(']', '\\]').replace('[', '\\[').replace('&', '\\&').replace('`', '\\`')\
.replace('$', '\\$')