From effa746b27fda0ccc498d190fff5a2f37480f65b Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 30 Sep 2020 09:33:14 +0200 Subject: [PATCH] Fixed #67 --- deemix/app/downloadjob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/app/downloadjob.py b/deemix/app/downloadjob.py index 1baa922..eb0372c 100644 --- a/deemix/app/downloadjob.py +++ b/deemix/app/downloadjob.py @@ -20,7 +20,7 @@ from deemix.api.deezer import USER_AGENT_HEADER from deemix.utils.taggers import tagID3, tagFLAC from Cryptodome.Cipher import Blowfish -from mutagen.flac import FLACNoHeaderError +from mutagen.flac import FLACNoHeaderError, error as FLACError import logging logging.basicConfig(level=logging.INFO) @@ -564,7 +564,7 @@ class DownloadJob: elif track.selectedFormat == 9: try: tagFLAC(writepath, track, self.settings['tags']) - except FLACNoHeaderError: + except (FLACNoHeaderError, FLACError): if writepath.is_file(): writepath.unlink() logger.warn(f"[{track.mainArtist['name']} - {track.title}] Track not available in FLAC, falling back if necessary") self.removeTrackPercentage()