mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2024-12-29 11:06:14 +00:00
Fixed #67
This commit is contained in:
parent
250682ea18
commit
effa746b27
|
@ -20,7 +20,7 @@ from deemix.api.deezer import USER_AGENT_HEADER
|
||||||
from deemix.utils.taggers import tagID3, tagFLAC
|
from deemix.utils.taggers import tagID3, tagFLAC
|
||||||
|
|
||||||
from Cryptodome.Cipher import Blowfish
|
from Cryptodome.Cipher import Blowfish
|
||||||
from mutagen.flac import FLACNoHeaderError
|
from mutagen.flac import FLACNoHeaderError, error as FLACError
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
@ -564,7 +564,7 @@ class DownloadJob:
|
||||||
elif track.selectedFormat == 9:
|
elif track.selectedFormat == 9:
|
||||||
try:
|
try:
|
||||||
tagFLAC(writepath, track, self.settings['tags'])
|
tagFLAC(writepath, track, self.settings['tags'])
|
||||||
except FLACNoHeaderError:
|
except (FLACNoHeaderError, FLACError):
|
||||||
if writepath.is_file(): writepath.unlink()
|
if writepath.is_file(): writepath.unlink()
|
||||||
logger.warn(f"[{track.mainArtist['name']} - {track.title}] Track not available in FLAC, falling back if necessary")
|
logger.warn(f"[{track.mainArtist['name']} - {track.title}] Track not available in FLAC, falling back if necessary")
|
||||||
self.removeTrackPercentage()
|
self.removeTrackPercentage()
|
||||||
|
|
Loading…
Reference in a new issue