1
0
Fork 0

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
1 changed files with 3 additions and 0 deletions

View File

@ -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))