mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 12:32:14 +10:00
dix: QueueMetadata needs varialbe "m_name" instead of "name"
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -4,15 +4,14 @@ use std::{
|
|||||||
usize,
|
usize,
|
||||||
};
|
};
|
||||||
|
|
||||||
use log::{debug, error, warn};
|
use log::{debug, error};
|
||||||
use reqwest::redirect::Policy;
|
use reqwest::redirect::Policy;
|
||||||
use tauri::{AppHandle, Emitter};
|
use tauri::{AppHandle, Emitter};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
database::{
|
database::
|
||||||
db::borrow_db_checked,
|
models::data::{DownloadType, DownloadableMetadata}
|
||||||
models::data::{DownloadType, DownloadableMetadata},
|
,
|
||||||
},
|
|
||||||
download_manager::{
|
download_manager::{
|
||||||
download_manager::{DownloadManagerSignal, DownloadStatus},
|
download_manager::{DownloadManagerSignal, DownloadStatus},
|
||||||
downloadable::Downloadable,
|
downloadable::Downloadable,
|
||||||
@ -156,16 +155,16 @@ impl Downloadable for URLDownloader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn on_complete(&self, _app_handle: &tauri::AppHandle) {
|
fn on_complete(&self, _app_handle: &tauri::AppHandle) {
|
||||||
println!("Completed url download");
|
debug!("Completed url download");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: fix this function. It doesn't restart the download properly, nor does it reset the state properly
|
// TODO: fix this function. It doesn't restart the download properly, nor does it reset the state properly
|
||||||
fn on_incomplete(&self, app_handle: &tauri::AppHandle) {
|
fn on_incomplete(&self, _app_handle: &tauri::AppHandle) {
|
||||||
println!("Incomplete url download");
|
debug!("Incomplete url download");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_cancelled(&self, _app_handle: &tauri::AppHandle) {
|
fn on_cancelled(&self, _app_handle: &tauri::AppHandle) {
|
||||||
println!("Cancelled url download");
|
debug!("Cancelled url download");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn status(&self) -> DownloadStatus {
|
fn status(&self) -> DownloadStatus {
|
||||||
|
|||||||
@ -46,13 +46,13 @@ pub fn get_queue_metadata(
|
|||||||
Some(QueueMetadata {
|
Some(QueueMetadata {
|
||||||
cover: game.m_cover_object_id.clone(),
|
cover: game.m_cover_object_id.clone(),
|
||||||
m_short_description: game.m_short_description.clone(),
|
m_short_description: game.m_short_description.clone(),
|
||||||
name: game.m_name.clone(),
|
m_name: game.m_name.clone(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
DownloadType::Tool => Some(QueueMetadata {
|
DownloadType::Tool => Some(QueueMetadata {
|
||||||
cover: "IDK Man".to_string(),
|
cover: "IDK Man".to_string(),
|
||||||
m_short_description: "This is a tool".to_string(),
|
m_short_description: "This is a tool".to_string(),
|
||||||
name: "Download".to_string(),
|
m_name: "Download".to_string(),
|
||||||
}),
|
}),
|
||||||
DownloadType::DLC => unimplemented!(),
|
DownloadType::DLC => unimplemented!(),
|
||||||
DownloadType::Mod => unimplemented!(),
|
DownloadType::Mod => unimplemented!(),
|
||||||
|
|||||||
@ -79,7 +79,7 @@ pub enum DownloadStatus {
|
|||||||
pub struct QueueMetadata {
|
pub struct QueueMetadata {
|
||||||
pub cover: String,
|
pub cover: String,
|
||||||
pub m_short_description: String,
|
pub m_short_description: String,
|
||||||
pub name: String
|
pub m_name: String
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Accessible front-end for the DownloadManager
|
/// Accessible front-end for the DownloadManager
|
||||||
|
|||||||
Reference in New Issue
Block a user