summaryrefslogtreecommitdiff
path: root/libmat2/audio.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmat2/audio.py')
-rw-r--r--libmat2/audio.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmat2/audio.py b/libmat2/audio.py
index bfe7f79..d7d02cd 100644
--- a/libmat2/audio.py
+++ b/libmat2/audio.py
@@ -38,6 +38,8 @@ class MP3Parser(MutagenParser):
38 metadata = {} # type: Dict[str, Union[str, dict]] 38 metadata = {} # type: Dict[str, Union[str, dict]]
39 meta = mutagen.File(self.filename).tags 39 meta = mutagen.File(self.filename).tags
40 for key in meta: 40 for key in meta:
41 if not hasattr(meta[key], 'text'):
42 continue
41 metadata[key.rstrip(' \t\r\n\0')] = ', '.join(map(str, meta[key].text)) 43 metadata[key.rstrip(' \t\r\n\0')] = ', '.join(map(str, meta[key].text))
42 return metadata 44 return metadata
43 45