fixed HTTPError handling

This commit is contained in:
uh_wot
2020-03-01 21:48:57 +01:00
parent 4509b809cb
commit 92d24aca83
2 changed files with 2 additions and 1 deletions

View File

@ -311,7 +311,7 @@ def downloadTrackObj(trackAPI, settings, overwriteBitrate=False, extraTrack=None
with open(writepath, 'wb') as stream:
dz.stream_track(track['id'], track['downloadUrl'], stream)
except HTTPError:
remove(writePath)
remove(writepath)
if track['selectedFormat'] == 9:
print("Track not available in flac, trying mp3")
track['filesize']['flac'] = 0