From 39aada312cdfaade4ad22dab8a6581fa79305630 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Mon, 29 Jan 2024 13:16:44 -0800 Subject: [PATCH] Fix last byte missing error with deezer (#608) --- streamrip/client/downloadable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamrip/client/downloadable.py b/streamrip/client/downloadable.py index a4a8f69..f5207d9 100644 --- a/streamrip/client/downloadable.py +++ b/streamrip/client/downloadable.py @@ -141,7 +141,7 @@ class DeezerDownloadable(Downloadable): async with aiofiles.open(path, "wb") as audio: buflen = len(buf) for i in range(0, buflen, self.chunk_size): - data = buf[i : min(i + self.chunk_size, buflen - 1)] + data = buf[i : min(i + self.chunk_size, buflen)] if len(data) >= 2048: decrypted_chunk = ( self._decrypt_chunk(blowfish_key, data[:2048])