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:
parent
caf78992fb
commit
addc1fce22
31 changed files with 1301 additions and 679 deletions
18
src/main.rs
18
src/main.rs
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue