feat: added format
field to wine/dxvk components versions
This commit is contained in:
parent
60e2b00ad5
commit
6e7dcefd99
4 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies.anime-game-core]
|
[dependencies.anime-game-core]
|
||||||
git = "https://github.com/an-anime-team/anime-game-core"
|
git = "https://github.com/an-anime-team/anime-game-core"
|
||||||
tag = "1.11.6"
|
tag = "1.11.7"
|
||||||
features = ["all"]
|
features = ["all"]
|
||||||
|
|
||||||
# path = "../anime-game-core" # ! for dev purposes only
|
# path = "../anime-game-core" # ! for dev purposes only
|
||||||
|
|
|
@ -93,6 +93,7 @@ pub struct Version {
|
||||||
pub title: String,
|
pub title: String,
|
||||||
pub version: String,
|
pub version: String,
|
||||||
pub uri: String,
|
pub uri: String,
|
||||||
|
pub format: Option<String>,
|
||||||
pub features: Option<Features>
|
pub features: Option<Features>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ pub fn get_wine_versions(index: &Path) -> anyhow::Result<Vec<wine::Group>> {
|
||||||
name: version["name"].as_str().unwrap().to_string(),
|
name: version["name"].as_str().unwrap().to_string(),
|
||||||
title: version["title"].as_str().unwrap().to_string(),
|
title: version["title"].as_str().unwrap().to_string(),
|
||||||
uri: version["uri"].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())?,
|
files: serde_json::from_value::<wine::Files>(version["files"].to_owned())?,
|
||||||
features: version.get("features").map(|v| v.into())
|
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(),
|
title: version["title"].as_str().unwrap().to_string(),
|
||||||
version: version["version"].as_str().unwrap().to_string(),
|
version: version["version"].as_str().unwrap().to_string(),
|
||||||
uri: version["uri"].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())
|
features: version.get("features").map(|v| v.into())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,7 @@ pub struct Version {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub title: String,
|
pub title: String,
|
||||||
pub uri: String,
|
pub uri: String,
|
||||||
|
pub format: Option<String>,
|
||||||
pub files: Files,
|
pub files: Files,
|
||||||
pub features: Option<Features>
|
pub features: Option<Features>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue