Rename configuration back to settings

This commit is contained in:
oSumAtrIX 2021-10-17 09:12:39 +02:00
parent 79d3d1bc5e
commit 873c71c9b8
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
2 changed files with 13 additions and 13 deletions

16
Cargo.lock generated
View file

@ -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",

View file

@ -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!(
"{}",