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

Make main_helper useful with values not from getopts.

Applications that gets these values from config file
shouldn't have to reinvent the wheel.
This commit is contained in:
Simon Persson 2017-01-06 12:50:44 +01:00
parent e254bb7291
commit b4c7e8e057
2 changed files with 34 additions and 19 deletions

View file

@ -32,11 +32,11 @@ fn main() {
main_helper::setup_logging(&matches);
let session = main_helper::create_session(&matches);
let credentials = main_helper::get_credentials(&session, &matches);
let session = main_helper::session_from_matches(&matches);
let credentials = main_helper::credentials_from_matches(&session, &matches);
session.login(credentials).unwrap();
let player = main_helper::create_player(&session, &matches);
let player = main_helper::player_from_matches(&session, &matches);
let spirc = SpircManager::new(session.clone(), player);
let spirc_signal = spirc.clone();