mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 09:11:28 +10:00
refactor: Created file settings.rs
Add constant values here to have a central management point for any relevant constants Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -2,6 +2,7 @@ use crate::auth::generate_authorization_header;
|
||||
use crate::db::DatabaseImpls;
|
||||
use crate::downloads::manifest::{DropDownloadContext, DropManifest};
|
||||
use crate::remote::RemoteAccessError;
|
||||
use crate::settings::DOWNLOAD_MAX_THREADS;
|
||||
use crate::DB;
|
||||
use log::info;
|
||||
use rayon::ThreadPoolBuilder;
|
||||
@ -24,7 +25,6 @@ pub struct GameDownloadAgent {
|
||||
pub control_flag: Arc<RwLock<DownloadThreadControlFlag>>,
|
||||
pub target_download_dir: usize,
|
||||
contexts: Mutex<Vec<DropDownloadContext>>,
|
||||
// pub progress: ProgressChecker<DropDownloadContext>,
|
||||
pub manifest: Mutex<Option<DropManifest>>,
|
||||
pub progress: ProgressObject,
|
||||
}
|
||||
@ -53,8 +53,6 @@ impl Display for GameDownloadError {
|
||||
}
|
||||
}
|
||||
|
||||
pub const DOWNLOAD_MAX_THREADS: usize = 4;
|
||||
|
||||
pub struct ProgressObject {
|
||||
pub max: u64,
|
||||
pub current: Arc<AtomicU64>,
|
||||
|
||||
Reference in New Issue
Block a user