1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 02:09:26 +02:00

Update protocol files.

This commit is contained in:
Paul Lietar 2015-07-01 19:49:03 +02:00
parent caf78992fb
commit addc1fce22
31 changed files with 1301 additions and 679 deletions

View file

@ -1,6 +1,6 @@
#![crate_name = "librespot"]
#![feature(alloc,plugin,core,collections,std_misc,zero_one)]
#![feature(plugin,zero_one,iter_arith,slice_position_elem,slice_bytes,bitset,mpsc_select,arc_weak,append)]
#![plugin(protobuf_macros)]
#[macro_use] extern crate lazy_static;
@ -62,6 +62,16 @@ fn main() {
session.poll();
let mut cache = MetadataCache::new(session.metadata.clone());
print_track(&mut cache, track_id);
loop {
session.poll();
}
}
fn print_track(cache: &mut MetadataCache, track_id: SpotifyId) {
let track : TrackRef = cache.get(track_id);
let album : AlbumRef = {
@ -85,11 +95,5 @@ fn main() {
let data = handle.unwrap();
eprintln!("{}", data.name);
}
Player::play(&session, track);
loop {
session.poll();
}
}