feat: added format field to wine/dxvk components versions

This commit is contained in:
Observer KRypt0n_ 2023-06-09 19:23:29 +02:00
parent 60e2b00ad5
commit 6e7dcefd99
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 5 additions and 1 deletions

View file

@ -9,7 +9,7 @@ edition = "2021"
[dependencies.anime-game-core]
git = "https://github.com/an-anime-team/anime-game-core"
tag = "1.11.6"
tag = "1.11.7"
features = ["all"]
# path = "../anime-game-core" # ! for dev purposes only

View file

@ -93,6 +93,7 @@ pub struct Version {
pub title: String,
pub version: String,
pub uri: String,
pub format: Option<String>,
pub features: Option<Features>
}

View file

@ -48,6 +48,7 @@ pub fn get_wine_versions(index: &Path) -> anyhow::Result<Vec<wine::Group>> {
name: version["name"].as_str().unwrap().to_string(),
title: version["title"].as_str().unwrap().to_string(),
uri: version["uri"].as_str().unwrap().to_string(),
format: version["format"].as_str().map(|str| str.to_string()),
files: serde_json::from_value::<wine::Files>(version["files"].to_owned())?,
features: version.get("features").map(|v| v.into())
});
@ -119,6 +120,7 @@ pub fn get_dxvk_versions(index: &Path) -> anyhow::Result<Vec<dxvk::Group>> {
title: version["title"].as_str().unwrap().to_string(),
version: version["version"].as_str().unwrap().to_string(),
uri: version["uri"].as_str().unwrap().to_string(),
format: version["format"].as_str().map(|str| str.to_string()),
features: version.get("features").map(|v| v.into())
});
}

View file

@ -147,6 +147,7 @@ pub struct Version {
pub name: String,
pub title: String,
pub uri: String,
pub format: Option<String>,
pub files: Files,
pub features: Option<Features>
}