mirror of
https://github.com/exverge-0/yuzu-games-parser.git
synced 2025-02-01 06:55:10 +00:00
Add build date
This commit is contained in:
parent
16425d4301
commit
991c8d737c
3 changed files with 14 additions and 11 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
/target
|
/target
|
||||||
/Cargo.lock
|
/Cargo.lock
|
||||||
src/US.en.json
|
src/US.en.json
|
||||||
.idea
|
.idea
|
||||||
|
.DS_Store
|
|
@ -40,7 +40,7 @@ fn main() -> anyhow::Result<()> {
|
||||||
println!("{}", serde_json::to_string_pretty(&serialize::Game {
|
println!("{}", serde_json::to_string_pretty(&serialize::Game {
|
||||||
name: result.title.clone(),
|
name: result.title.clone(),
|
||||||
description: eshop.get(&eshop_id).unwrap().get("description").unwrap().as_str().unwrap().to_string(),
|
description: eshop.get(&eshop_id).unwrap().get("description").unwrap().as_str().unwrap().to_string(),
|
||||||
titleId: title_id,
|
title_id,
|
||||||
img: eshop.get(&eshop_id).unwrap().get("iconUrl").unwrap().as_str().unwrap().to_string(),
|
img: eshop.get(&eshop_id).unwrap().get("iconUrl").unwrap().as_str().unwrap().to_string(),
|
||||||
tests: result.testcases.iter().map(|x| serialize::testcase_to_test(x)).collect(),
|
tests: result.testcases.iter().map(|x| serialize::testcase_to_test(x)).collect(),
|
||||||
}).unwrap());
|
}).unwrap());
|
||||||
|
|
|
@ -5,21 +5,22 @@ use crate::{OS, TestCase};
|
||||||
pub struct Game {
|
pub struct Game {
|
||||||
pub(crate) name: String,
|
pub(crate) name: String,
|
||||||
pub(crate) description: String,
|
pub(crate) description: String,
|
||||||
pub(crate) titleId: String,
|
pub(crate) title_id: String,
|
||||||
pub(crate) img: String,
|
pub(crate) img: String,
|
||||||
pub(crate) tests: Vec<Test>,
|
pub(crate) tests: Vec<Test>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct Test {
|
pub struct Test {
|
||||||
pub(crate) tester: Option<String>,
|
pub tester: Option<String>,
|
||||||
pub(crate) rating: i8,
|
pub rating: i8,
|
||||||
pub(crate) details: Option<String>,
|
pub details: Option<String>,
|
||||||
pub(crate) cpu: String,
|
pub test_date: String,
|
||||||
pub(crate) gpu: String,
|
pub cpu: String,
|
||||||
pub(crate) version: String,
|
pub gpu: String,
|
||||||
pub(crate) os: String,
|
pub version: String,
|
||||||
pub(crate) from_yuzu: bool,
|
pub os: String,
|
||||||
|
pub from_yuzu: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn testcase_to_test(case: &TestCase) -> Test {
|
pub fn testcase_to_test(case: &TestCase) -> Test {
|
||||||
|
@ -35,6 +36,7 @@ pub fn testcase_to_test(case: &TestCase) -> Test {
|
||||||
_ => unreachable!()
|
_ => unreachable!()
|
||||||
},
|
},
|
||||||
details: None,
|
details: None,
|
||||||
|
test_date: case.date.clone(),
|
||||||
cpu: case.cpu.clone(),
|
cpu: case.cpu.clone(),
|
||||||
gpu: case.gpu.clone(),
|
gpu: case.gpu.clone(),
|
||||||
version: case.version.clone(),
|
version: case.version.clone(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue