From 143bb0a5f327d97403a37cc0a166ec7100bba3de Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 18 Dec 2021 19:43:21 +0100 Subject: [PATCH] Add a check for weird audio files, instead of crashing --- libmat2/audio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmat2/audio.py b/libmat2/audio.py index 09e1146..16b86f0 100644 --- a/libmat2/audio.py +++ b/libmat2/audio.py @@ -41,6 +41,9 @@ class MP3Parser(MutagenParser): if not meta: return metadata for key in meta: + if isinstance(key, tuple): + metadata[key[0]] = key[1] + continue if not hasattr(meta[key], 'text'): # pragma: no cover continue metadata[key.rstrip(' \t\r\n\0')] = ', '.join(map(str, meta[key].text))