mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Always seek to starting position
This commit is contained in:
parent
05c768f612
commit
286a031d94
2 changed files with 17 additions and 8 deletions
|
@ -387,6 +387,10 @@ impl AudioFileStreaming {
|
|||
bytes_per_second: usize,
|
||||
play_from_beginning: bool,
|
||||
) -> Result<AudioFileStreaming, Error> {
|
||||
// When the audio file is really small, this `download_size` may turn out to be
|
||||
// larger than the audio file we're going to stream later on. This is OK; requesting
|
||||
// `Content-Range` > `Content-Length` will return the complete file with status code
|
||||
// 206 Partial Content.
|
||||
let download_size = if play_from_beginning {
|
||||
INITIAL_DOWNLOAD_SIZE
|
||||
+ max(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue