ignore same file error

This commit is contained in:
quackerd 2020-09-30 15:43:58 -04:00
parent 7d5fdc7284
commit 487b730117
Signed by: d
GPG Key ID: 590A22374D0B819F

View File

@ -141,7 +141,10 @@ def process_file(f: str, odir: str):
os.makedirs(target_dir, exist_ok = True)
target_f = os.path.join(target_dir, os.path.basename(f))
shutil.copyfile(f, target_f)
try:
shutil.copyfile(f, target_f)
except shutil.SameFileError:
pass
print(" Copied file to - " + target_f)
cover_idx = find_best_cover(artist, album, title)