mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Fix compile issues after merge
This commit is contained in:
parent
6545674a63
commit
971b2a9b9f
3 changed files with 5 additions and 3 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -843,6 +843,7 @@ dependencies = [
|
|||
"aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lewton 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"librespot-core 0.1.0",
|
||||
|
|
|
@ -9,6 +9,7 @@ path = "../core"
|
|||
[dependencies]
|
||||
bit-set = "0.5"
|
||||
byteorder = "1.3"
|
||||
bytes = "0.4"
|
||||
futures = "0.1"
|
||||
lewton = "0.9"
|
||||
log = "0.4"
|
||||
|
|
|
@ -67,7 +67,7 @@ impl StreamLoaderController {
|
|||
|
||||
pub fn range_available(&self, range: Range) -> bool {
|
||||
if let Some(ref shared) = self.stream_shared {
|
||||
let mut download_status = shared.download_status.lock().unwrap();
|
||||
let download_status = shared.download_status.lock().unwrap();
|
||||
if range.length <= download_status.downloaded.contained_length_from_value(range.start) {
|
||||
return true;
|
||||
} else {
|
||||
|
@ -218,7 +218,7 @@ impl AudioFileOpenStreaming {
|
|||
});
|
||||
|
||||
let mut write_file = NamedTempFile::new().unwrap();
|
||||
write_file.set_len(size as u64).unwrap();
|
||||
write_file.as_file().set_len(size as u64).unwrap();
|
||||
write_file.seek(SeekFrom::Start(0)).unwrap();
|
||||
|
||||
let read_file = write_file.reopen().unwrap();
|
||||
|
@ -450,7 +450,7 @@ impl Future for AudioFileFetchDataReceiver {
|
|||
Ok(Async::Ready(Some(data))) => {
|
||||
if let Some(request_sent_time) = self.request_sent_time {
|
||||
let duration = Instant::now() - request_sent_time;
|
||||
let mut duration_ms: u64;
|
||||
let duration_ms: u64;
|
||||
if duration.as_secs() > MAXIMUM_ASSUMED_PING_TIME_SECONDS {
|
||||
duration_ms = MAXIMUM_ASSUMED_PING_TIME_SECONDS * 1000;
|
||||
}else {
|
||||
|
|
Loading…
Reference in a new issue