1
0
mirror of synced 2024-06-12 00:59:51 +02:00

Simplify a bit MP3 handling

This commit is contained in:
jvoisin 2018-03-25 16:31:21 +02:00
parent 2eb68928d5
commit aa893e9d61

View File

@ -24,11 +24,10 @@ class MP3Parser(MutagenParser):
mimetypes = {'audio/mpeg', } mimetypes = {'audio/mpeg', }
def get_meta(self): def get_meta(self):
meta = super().get_meta()
metadata = {} metadata = {}
f = mutagen.File(self.filename) for key in meta:
if f.tags: metadata[key] = meta[key].text
for key in f.tags:
metadata[key] = f.tags[key].text
return metadata return metadata
class OGGParser(MutagenParser): class OGGParser(MutagenParser):