diff --git a/Cargo.lock b/Cargo.lock index 9a3b7f2..f5d929c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "librespot" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "base64", "env_logger", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "librespot-audio" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "aes-ctr", "byteorder", @@ -1388,7 +1388,7 @@ dependencies = [ [[package]] name = "librespot-connect" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "form_urlencoded", "futures-util", @@ -1408,7 +1408,7 @@ dependencies = [ [[package]] name = "librespot-core" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "aes", "base64", @@ -1448,7 +1448,7 @@ dependencies = [ [[package]] name = "librespot-discovery" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "aes-ctr", "base64", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "librespot-metadata" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "async-trait", "byteorder", @@ -1483,7 +1483,7 @@ dependencies = [ [[package]] name = "librespot-playback" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "byteorder", "cpal", @@ -1507,7 +1507,7 @@ dependencies = [ [[package]] name = "librespot-protocol" version = "0.3.0" -source = "git+https://github.com/oSumAtrIX/free-librespot#19dea7516f71818a64cbded6c5a94065f22677c7" +source = "git+ssh://git@github.com/oSumAtrIX/free-librespot.git?branch=dev#19dea7516f71818a64cbded6c5a94065f22677c7" dependencies = [ "glob", "protobuf", diff --git a/src/main.rs b/src/main.rs index 56b0626..f7ccfda 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ extern crate log; use async_std::{task, task::block_on}; use colored::{Colorize, control::set_virtual_terminal}; use downloader::{DownloadState, Downloader}; -use configuration::Configuration; +use settings::Settings; use spotify::Spotify; use std::{ env, @@ -16,7 +16,7 @@ use std::{ mod converter; mod downloader; mod error; -mod configuration; +mod settings; mod spotify; mod tag; @@ -33,7 +33,7 @@ async fn start() { }; } - let settings = match Configuration::load("settings.json".to_string()).await { + let settings = match Settings::load().await { Ok(settings) => { println!( "{} {}.", @@ -49,8 +49,8 @@ async fn start() { e ); let default_settings = - Configuration::new("username", "password", "client_id", "secret").unwrap(); - match default_settings.save("settings.json".to_string()).await { + Settings::new("username", "password", "client_id", "secret").unwrap(); + match default_settings.save().await { Ok(_) => { println!( "{}",