mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-09 20:12: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,
|
||||
};
|
||||
|
||||
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 {
|
||||
|
||||
@ -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!(),
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user