support custom manifest

This commit is contained in:
Julian Freeman
2026-03-30 22:31:49 -04:00
parent 5717b94c90
commit a7b5955540
4 changed files with 62 additions and 25 deletions

View File

@@ -16,10 +16,14 @@ pub struct Software {
pub status: String, // "idle", "pending", "installing", "success", "error"
#[serde(default = "default_progress")]
pub progress: f32,
#[serde(default = "default_false")]
pub use_manifest: bool,
pub manifest_url: Option<String>,
}
fn default_status() -> String { "idle".to_string() }
fn default_progress() -> f32 { 0.0 }
fn default_false() -> bool { false }
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
@@ -276,5 +280,7 @@ fn map_package(p: WingetPackage) -> Software {
icon_url: p.icon_url,
status: "idle".to_string(),
progress: 0.0,
use_manifest: false,
manifest_url: None,
}
}