mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Remove unused code from metadata lib
This commit is contained in:
parent
9468ab7eec
commit
c7c24951d9
1 changed files with 0 additions and 24 deletions
|
@ -146,30 +146,6 @@ pub trait Metadata: Send + Sized + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait PlaylistMeta: Send + Sized + 'static {
|
||||
type Message: protobuf::Message;
|
||||
|
||||
fn base_url() -> &'static str;
|
||||
fn parse(msg: &Self::Message, session: &Session) -> Self;
|
||||
|
||||
fn get(session: &Session, id: SpotifyId, user: String, start: i32, len: i32) -> Box<Future<Item = Self, Error = MercuryError>> {
|
||||
//let uri = format!("hm://playlist/{}?from={}&length={}",id.to_base62(), 0, 100);
|
||||
//let uri = format!("hm://playlist/user/{}/playlist/{}?from={}&length={}", user, id.to_base62(), start, len);
|
||||
let uri = format!("hm://playlist/v2/playlist/{}", id.to_base62());
|
||||
println!("request uri: {}", uri);
|
||||
let request = session.mercury().get(uri);
|
||||
println!("a");
|
||||
let session = session.clone();
|
||||
Box::new(request.and_then(move |response| {
|
||||
println!("{:?}", response);
|
||||
let data = response.payload.first().expect("Empty payload");
|
||||
let msg: Self::Message = protobuf::parse_from_bytes(data).unwrap();
|
||||
println!("{:?}", msg);
|
||||
Ok(Self::parse(&msg, &session))
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Track {
|
||||
pub id: SpotifyId,
|
||||
|
|
Loading…
Reference in a new issue