1
0
mirror of synced 2024-11-25 02:34:24 +01:00

Add a check for weird audio files, instead of crashing

This commit is contained in:
jvoisin 2021-12-18 19:43:21 +01:00
parent a1a7c76dc9
commit 143bb0a5f3

View File

@ -41,6 +41,9 @@ class MP3Parser(MutagenParser):
if not meta: if not meta:
return metadata return metadata
for key in meta: for key in meta:
if isinstance(key, tuple):
metadata[key[0]] = key[1]
continue
if not hasattr(meta[key], 'text'): # pragma: no cover if not hasattr(meta[key], 'text'): # pragma: no cover
continue continue
metadata[key.rstrip(' \t\r\n\0')] = ', '.join(map(str, meta[key].text)) metadata[key.rstrip(' \t\r\n\0')] = ', '.join(map(str, meta[key].text))