support custom manifest
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user