ignore same file error
This commit is contained in:
parent
7d5fdc7284
commit
487b730117
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user