From 46b3ae16729c3f18c4bfebccf928e422a2e5c4f4 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Wed, 22 Jul 2020 15:47:35 +0200
Subject: [PATCH] Fix a crash affecting some mp3 files

---
 libmat2/audio.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libmat2/audio.py b/libmat2/audio.py
index 5f0c765..0d54930 100644
--- a/libmat2/audio.py
+++ b/libmat2/audio.py
@@ -37,6 +37,8 @@ class MP3Parser(MutagenParser):
     def get_meta(self) -> Dict[str, Union[str, dict]]:
         metadata = {}  # type: Dict[str, Union[str, dict]]
         meta = mutagen.File(self.filename).tags
+        if not meta:
+            return metadata
         for key in meta:
             if not hasattr(meta[key], 'text'):  # pragma: no cover
                 continue
-- 
GitLab