mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Fix formula for the number of chunks.
It was rounding to the nearest boundary as opposed to rounding up. This caused the last chunk to not always be downloaded.
This commit is contained in:
parent
654a403459
commit
525b27df98
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ impl AudioFileLoading {
|
||||||
}
|
}
|
||||||
}).next().unwrap();
|
}).next().unwrap();
|
||||||
|
|
||||||
let chunk_count = (size + CHUNK_SIZE / 2) / CHUNK_SIZE;
|
let chunk_count = (size + CHUNK_SIZE - 1) / CHUNK_SIZE;
|
||||||
|
|
||||||
let shared = Arc::new(AudioFileShared {
|
let shared = Arc::new(AudioFileShared {
|
||||||
file_id: file_id,
|
file_id: file_id,
|
||||||
|
|
Loading…
Reference in a new issue