mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-09 14:11:55 -04:00
Handle ID3NoHeaderError for qobuz mp3
This commit is contained in:
parent
86595984a0
commit
df44ae75a5
1 changed files with 5 additions and 1 deletions
|
@ -8,6 +8,7 @@ from mutagen.flac import FLAC, Picture
|
|||
from mutagen.id3 import (
|
||||
APIC, # type: ignore
|
||||
ID3,
|
||||
ID3NoHeaderError,
|
||||
)
|
||||
from mutagen.mp4 import MP4, MP4Cover
|
||||
|
||||
|
@ -106,7 +107,10 @@ class Container(Enum):
|
|||
elif self == Container.AAC:
|
||||
return MP4(path)
|
||||
elif self == Container.MP3:
|
||||
return ID3(path)
|
||||
try:
|
||||
return ID3(path)
|
||||
except ID3NoHeaderError:
|
||||
return ID3()
|
||||
# unreachable
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue