diff options
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/audio.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libmat2/audio.py b/libmat2/audio.py index 99a335d..f2a5e94 100644 --- a/libmat2/audio.py +++ b/libmat2/audio.py | |||
| @@ -44,3 +44,17 @@ class OGGParser(MutagenParser): | |||
| 44 | 44 | ||
| 45 | class FLACParser(MutagenParser): | 45 | class FLACParser(MutagenParser): |
| 46 | mimetypes = {'audio/flac', 'audio/x-flac'} | 46 | mimetypes = {'audio/flac', 'audio/x-flac'} |
| 47 | |||
| 48 | def remove_all(self): | ||
| 49 | shutil.copy(self.filename, self.output_filename) | ||
| 50 | f = mutagen.File(self.output_filename) | ||
| 51 | f.clear_pictures() | ||
| 52 | f.delete() | ||
| 53 | f.save(deleteid3=True) | ||
| 54 | return True | ||
| 55 | |||
| 56 | def get_meta(self): | ||
| 57 | meta = super().get_meta() | ||
| 58 | if mutagen.File(self.filename).pictures: | ||
| 59 | meta['Picture'] = 'Cover' | ||
| 60 | return meta | ||
