dix: QueueMetadata needs varialbe "m_name" instead of "name"

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-06-05 18:26:06 +10:00
parent ae6935554f
commit 11e20f3ca9
3 changed files with 11 additions and 12 deletions

View File

@ -4,15 +4,14 @@ use std::{
usize,
};
use log::{debug, error, warn};
use log::{debug, error};
use reqwest::redirect::Policy;
use tauri::{AppHandle, Emitter};
use crate::{
database::{
db::borrow_db_checked,
models::data::{DownloadType, DownloadableMetadata},
},
database::
models::data::{DownloadType, DownloadableMetadata}
,
download_manager::{
download_manager::{DownloadManagerSignal, DownloadStatus},
downloadable::Downloadable,
@ -156,16 +155,16 @@ impl Downloadable for URLDownloader {
}
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
fn on_incomplete(&self, app_handle: &tauri::AppHandle) {
println!("Incomplete url download");
fn on_incomplete(&self, _app_handle: &tauri::AppHandle) {
debug!("Incomplete url download");
}
fn on_cancelled(&self, _app_handle: &tauri::AppHandle) {
println!("Cancelled url download");
debug!("Cancelled url download");
}
fn status(&self) -> DownloadStatus {

View File

@ -46,13 +46,13 @@ pub fn get_queue_metadata(
Some(QueueMetadata {
cover: game.m_cover_object_id.clone(),
m_short_description: game.m_short_description.clone(),
name: game.m_name.clone(),
m_name: game.m_name.clone(),
})
}
DownloadType::Tool => Some(QueueMetadata {
cover: "IDK Man".to_string(),
m_short_description: "This is a tool".to_string(),
name: "Download".to_string(),
m_name: "Download".to_string(),
}),
DownloadType::DLC => unimplemented!(),
DownloadType::Mod => unimplemented!(),

View File

@ -79,7 +79,7 @@ pub enum DownloadStatus {
pub struct QueueMetadata {
pub cover: String,
pub m_short_description: String,
pub name: String
pub m_name: String
}
/// Accessible front-end for the DownloadManager