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

Move get_credentials to authentication module.

This commit is contained in:
Simon Persson 2017-01-06 17:18:41 +01:00
parent f11310581c
commit 560d4e1c4c
3 changed files with 35 additions and 35 deletions

View file

@ -8,6 +8,7 @@ use std::thread;
use librespot::spirc::SpircManager;
use librespot::main_helper;
use librespot::authentication::get_credentials;
fn usage(program: &str, opts: &getopts::Options) -> String {
let brief = format!("Usage: {} [options]", program);
@ -33,7 +34,8 @@ fn main() {
main_helper::setup_logging(&matches);
let session = main_helper::create_session(&matches);
let credentials = main_helper::get_credentials(&session, &matches);
let credentials = get_credentials(&session, matches.opt_str("username"),
matches.opt_str("password"));
session.login(credentials).unwrap();
let player = main_helper::create_player(&session, &matches);