mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Update audio to hyper 1.x
This commit is contained in:
parent
0a7a874ca0
commit
6a4053e871
4 changed files with 9 additions and 4 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1424,6 +1424,7 @@ dependencies = [
|
||||||
"ctr",
|
"ctr",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"librespot-core",
|
"librespot-core",
|
||||||
|
|
|
@ -19,7 +19,9 @@ bytes = "1"
|
||||||
ctr = "0.9"
|
ctr = "0.9"
|
||||||
futures-core = "0.3"
|
futures-core = "0.3"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
hyper = { version = "0.14", features = ["client", "backports", "deprecated"] }
|
hyper = { version = "1.3", features = [] }
|
||||||
|
hyper-util = { version = "0.1", features = ["client"] }
|
||||||
|
http-body-util = "0.1.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
|
|
@ -12,7 +12,8 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use futures_util::{future::IntoStream, StreamExt, TryFutureExt};
|
use futures_util::{future::IntoStream, StreamExt, TryFutureExt};
|
||||||
use hyper::{client::ResponseFuture, header::CONTENT_RANGE, Body, Response, StatusCode};
|
use hyper::{body::Incoming, header::CONTENT_RANGE, Response, StatusCode};
|
||||||
|
use hyper_util::client::legacy::ResponseFuture;
|
||||||
use parking_lot::{Condvar, Mutex};
|
use parking_lot::{Condvar, Mutex};
|
||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
@ -133,7 +134,7 @@ pub enum AudioFile {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StreamingRequest {
|
pub struct StreamingRequest {
|
||||||
streamer: IntoStream<ResponseFuture>,
|
streamer: IntoStream<ResponseFuture>,
|
||||||
initial_response: Option<Response<Body>>,
|
initial_response: Option<Response<Incoming>>,
|
||||||
offset: usize,
|
offset: usize,
|
||||||
length: usize,
|
length: usize,
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,10 @@ use std::{
|
||||||
|
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
use hyper::{body::HttpBody, StatusCode};
|
use hyper::StatusCode;
|
||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
use tokio::sync::{mpsc, oneshot};
|
use tokio::sync::{mpsc, oneshot};
|
||||||
|
use http_body_util::BodyExt;
|
||||||
|
|
||||||
use librespot_core::{http_client::HttpClient, session::Session, Error};
|
use librespot_core::{http_client::HttpClient, session::Session, Error};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue