1
0
Fork 0
mirror of synced 2025-07-04 04:17:29 +02:00

Delete pictures of FLAC files

This commit is contained in:
jvoisin 2018-10-11 18:15:11 +02:00
parent 35dca4bf1c
commit b2e153b69c
3 changed files with 15 additions and 0 deletions

View file

@ -44,3 +44,17 @@ class OGGParser(MutagenParser):
class FLACParser(MutagenParser):
mimetypes = {'audio/flac', 'audio/x-flac'}
def remove_all(self):
shutil.copy(self.filename, self.output_filename)
f = mutagen.File(self.output_filename)
f.clear_pictures()
f.delete()
f.save(deleteid3=True)
return True
def get_meta(self):
meta = super().get_meta()
if mutagen.File(self.filename).pictures:
meta['Picture'] = 'Cover'
return meta