Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit 46b3ae16 authored by jvoisin's avatar jvoisin
Browse files

Fix a crash affecting some mp3 files

parent d0bc7944
Pipeline #48453 failed with stages
in 35 seconds
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment