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

Use canonical username when subscribing to spirc.

Uses canonical username that APWelcome message
contains once authenticated instead of username 
provided by user. SpircManager now accesses it via
its Session field. 

Fixes #15
This commit is contained in:
Jaime Rodriguez 2015-12-30 19:50:23 +01:00
parent 525b27df98
commit e321379501
3 changed files with 17 additions and 7 deletions

View file

@ -63,6 +63,7 @@ fn main() {
device_id: name.clone(),
cache_location: PathBuf::from(cache_location)
};
let session = Session::new(config);
session.login(username.clone(), password);
session.poll();
@ -76,7 +77,7 @@ fn main() {
let player = Player::new(&session);
let mut spirc_manager = SpircManager::new(&session, player, username, name);
let mut spirc_manager = SpircManager::new(&session, player, name);
spirc_manager.run();
}