From ecc9b91d90eb54e948694661eb4b2576b8886968 Mon Sep 17 00:00:00 2001 From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com> Date: Sun, 1 Mar 2020 21:50:53 +0100 Subject: [PATCH] fixed decrypt_track function --- 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 efee77f..e747e48 100755 --- a/deemix/api/deezer.py +++ b/deemix/api/deezer.py @@ -242,14 +242,13 @@ class Deezer: response = open(input, 'rb') outfile = open(output, 'wb') 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 while True: chunk = response.read(2048) if not chunk: break 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) outfile.write(chunk) i += 1