mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-16 01:31:22 +10:00
feat(downloads): Added AgentInterfaceData to get information about all downloads in queue
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -28,7 +28,7 @@ pub struct GameDownloadAgent {
|
||||
pub progress: ProgressObject,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum GameDownloadError {
|
||||
CommunicationError(RemoteAccessError),
|
||||
ChecksumError,
|
||||
@ -50,11 +50,11 @@ impl Display for GameDownloadError {
|
||||
impl GameDownloadAgent {
|
||||
pub fn new(id: String, version: String, target_download_dir: usize) -> Self {
|
||||
// Don't run by default
|
||||
let status = DownloadThreadControl::new(DownloadThreadControlFlag::Stop);
|
||||
let control_flag = DownloadThreadControl::new(DownloadThreadControlFlag::Stop);
|
||||
Self {
|
||||
id,
|
||||
version,
|
||||
control_flag: status.clone(),
|
||||
control_flag,
|
||||
manifest: Mutex::new(None),
|
||||
target_download_dir,
|
||||
contexts: Mutex::new(Vec::new()),
|
||||
@ -207,6 +207,7 @@ impl GameDownloadAgent {
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
|
||||
pool.scope(move |scope| {
|
||||
let contexts = self.contexts.lock().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user