mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-13 06:34:45 -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 (
|
from mutagen.id3 import (
|
||||||
APIC, # type: ignore
|
APIC, # type: ignore
|
||||||
ID3,
|
ID3,
|
||||||
|
ID3NoHeaderError,
|
||||||
)
|
)
|
||||||
from mutagen.mp4 import MP4, MP4Cover
|
from mutagen.mp4 import MP4, MP4Cover
|
||||||
|
|
||||||
|
@ -106,7 +107,10 @@ class Container(Enum):
|
||||||
elif self == Container.AAC:
|
elif self == Container.AAC:
|
||||||
return MP4(path)
|
return MP4(path)
|
||||||
elif self == Container.MP3:
|
elif self == Container.MP3:
|
||||||
|
try:
|
||||||
return ID3(path)
|
return ID3(path)
|
||||||
|
except ID3NoHeaderError:
|
||||||
|
return ID3()
|
||||||
# unreachable
|
# unreachable
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue