Fix last byte missing error with deezer (#608)

This commit is contained in:
Nathan Thomas 2024-01-29 13:16:44 -08:00 committed by GitHub
parent 87d59648cf
commit 39aada312c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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])