mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 17:21:19 +10:00
chore: Swapped over to using a macro with an offline mode
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user