From 13458e5059499b2529d793bcb75f8762a3b79833 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 5cdfa428..ebecb395 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -72,30 +72,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,