From fcaf5f705382f4bad16813cea50748151f1525a3 Mon Sep 17 00:00:00 2001 From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com> Date: Sat, 29 Feb 2020 23:58:33 +0100 Subject: [PATCH] fixed corrupted files --- deemix/api/deezer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deemix/api/deezer.py b/deemix/api/deezer.py index ea809ef..29f8d5a 100755 --- a/deemix/api/deezer.py +++ b/deemix/api/deezer.py @@ -256,11 +256,10 @@ class Deezer: def stream_track(self, track_id, url, stream): request = requests.get(url, stream=True) blowfish_key = str.encode(self._get_blowfish_key(str(track_id))) - blowfish = Blowfish.new(blowfish_key, Blowfish.MODE_CBC, b"\x00\x01\x02\x03\x04\x05\x06\x07") i = 0 for chunk in request.iter_content(2048): if (i % 3) == 0 and len(chunk) == 2048: - chunk = blowfish.decrypt(chunk) + chunk = Blowfish.new(blowfish_key, Blowfish.MODE_CBC, b"\x00\x01\x02\x03\x04\x05\x06\x07").decrypt(chunk) stream.write(chunk) i += 1