Skip to content
Snippets Groups Projects
Commit 46b3ae16 authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Fix a crash affecting some mp3 files

parent d0bc7944
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,8 @@ class MP3Parser(MutagenParser): ...@@ -37,6 +37,8 @@ class MP3Parser(MutagenParser):
def get_meta(self) -> Dict[str, Union[str, dict]]: def get_meta(self) -> Dict[str, Union[str, dict]]:
metadata = {} # type: Dict[str, Union[str, dict]] metadata = {} # type: Dict[str, Union[str, dict]]
meta = mutagen.File(self.filename).tags meta = mutagen.File(self.filename).tags
if not meta:
return metadata
for key in meta: for key in meta:
if not hasattr(meta[key], 'text'): # pragma: no cover if not hasattr(meta[key], 'text'): # pragma: no cover
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment