From c7c24951d995b5386431dc5718c02c39451f3244 Mon Sep 17 00:00:00 2001 From: HEnquist Date: Tue, 6 Aug 2019 22:04:27 +0200 Subject: [PATCH] Remove unused code from metadata lib --- metadata/src/lib.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 01da9f3c..fda82cfa 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -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> { - //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,