mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Rerun rustfmt on full codebase
This commit is contained in:
parent
d26590afc5
commit
38d82f2dc2
10 changed files with 99 additions and 44 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
use env_logger;
|
||||
use std::env;
|
||||
use tokio_core::reactor::Core;
|
||||
|
@ -7,7 +6,7 @@ use librespot::core::authentication::Credentials;
|
|||
use librespot::core::config::SessionConfig;
|
||||
use librespot::core::session::Session;
|
||||
use librespot::core::spotify_id::SpotifyId;
|
||||
use librespot::metadata::{Metadata, Track, Playlist};
|
||||
use librespot::metadata::{Metadata, Playlist, Track};
|
||||
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
@ -26,16 +25,16 @@ fn main() {
|
|||
|
||||
let uri_split = args[3].split(":");
|
||||
let uri_parts: Vec<&str> = uri_split.collect();
|
||||
println!("{}, {}, {}",uri_parts[0], uri_parts[1], uri_parts[2]);
|
||||
|
||||
println!("{}, {}, {}", uri_parts[0], uri_parts[1], uri_parts[2]);
|
||||
|
||||
let plist_uri = SpotifyId::from_base62(uri_parts[2]).unwrap();
|
||||
|
||||
|
||||
let session = core
|
||||
.run(Session::connect(session_config, credentials, None, handle))
|
||||
.unwrap();
|
||||
|
||||
let plist = core.run(Playlist::get(&session, plist_uri)).unwrap();
|
||||
println!("{:?}",plist);
|
||||
println!("{:?}", plist);
|
||||
for track_id in plist.tracks {
|
||||
let plist_track = core.run(Track::get(&session, track_id)).unwrap();
|
||||
println!("track: {} ", plist_track.name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue