feat(downloads): Added AgentInterfaceData to get information about all downloads in queue

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-16 17:03:37 +11:00
parent f029cbf0b3
commit 63c3cc1096
8 changed files with 98 additions and 44 deletions

View File

@ -36,17 +36,9 @@ pub fn download_game(
}
#[tauri::command]
pub fn get_game_download_progress(
pub fn get_current_game_download_progress(
state: tauri::State<'_, Mutex<AppState>>,
game_id: String,
) -> Result<f64, String> {
/*
let download_agent = use_download_agent(state, game_id)?;
let progress = &download_agent.progress;
Ok(progress.get_progress())
*/
let progress = state
.lock()
.unwrap()