chore: Swapped over to using a macro with an offline mode

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-30 09:35:43 +11:00
parent 810fbdfe49
commit bb23e88ead
7 changed files with 17 additions and 76 deletions

View File

@ -113,10 +113,7 @@ impl Database {
prev_database,
base_url: "".to_owned(),
auth: None,
settings: Settings {
autostart: false,
max_download_threads: 4,
},
settings: Settings::default(),
cache_dir,
}
}

View File

@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
pub struct Settings {
pub autostart: bool,
pub max_download_threads: usize,
pub force_offline: bool
// ... other settings ...
}
impl Default for Settings {
@ -12,6 +13,7 @@ impl Default for Settings {
Self {
autostart: false,
max_download_threads: 4,
force_offline: false
}
}
}