1
0
Fork 0

Increase audio processing robustness

This commit is contained in:
jvoisin 2021-12-19 22:33:28 +01:00
parent 143bb0a5f3
commit d555a02c90
1 changed files with 5 additions and 2 deletions

View File

@ -27,8 +27,11 @@ class MutagenParser(abstract.AbstractParser):
def remove_all(self) -> bool:
shutil.copy(self.filename, self.output_filename)
f = mutagen.File(self.output_filename)
f.delete()
f.save()
try:
f.delete()
f.save()
except mutagen.MutagenError:
raise ValueError
return True