mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-24 17:03:00 +10:00
refactor(download manager): Fully separate & generic download manager
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@@ -27,6 +27,7 @@ use db::{
|
||||
};
|
||||
use download_manager::download_manager::DownloadManager;
|
||||
use download_manager::download_manager_builder::DownloadManagerBuilder;
|
||||
use download_manager::downloadable_metadata::DownloadableMetadata;
|
||||
use debug::fetch_system_data;
|
||||
use downloads::download_commands::*;
|
||||
use http::Response;
|
||||
@@ -81,7 +82,7 @@ pub struct User {
|
||||
pub struct AppState<'a> {
|
||||
status: AppStatus,
|
||||
user: Option<User>,
|
||||
games: HashMap<String, Game>,
|
||||
games: HashMap<DownloadableMetadata, Game>,
|
||||
|
||||
#[serde(skip_serializing)]
|
||||
download_manager: Arc<DownloadManager>,
|
||||
@@ -181,7 +182,7 @@ fn setup(handle: AppHandle) -> AppState<'static> {
|
||||
db_handle
|
||||
.applications
|
||||
.statuses
|
||||
.entry(game_id.to_string())
|
||||
.entry(game_id)
|
||||
.and_modify(|v| *v = ApplicationStatus::Remote {});
|
||||
}
|
||||
drop(db_handle);
|
||||
|
||||
Reference in New Issue
Block a user