Add build date

This commit is contained in:
Exverge 2024-03-29 17:48:13 -04:00
parent 16425d4301
commit 991c8d737c
No known key found for this signature in database
GPG key ID: 19AAFC0AC6A9B35A
3 changed files with 14 additions and 11 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/Cargo.lock
src/US.en.json
.idea
.DS_Store

View file

@ -40,7 +40,7 @@ fn main() -> anyhow::Result<()> {
println!("{}", serde_json::to_string_pretty(&serialize::Game {
name: result.title.clone(),
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(),
tests: result.testcases.iter().map(|x| serialize::testcase_to_test(x)).collect(),
}).unwrap());

View file

@ -5,21 +5,22 @@ use crate::{OS, TestCase};
pub struct Game {
pub(crate) name: String,
pub(crate) description: String,
pub(crate) titleId: String,
pub(crate) title_id: String,
pub(crate) img: String,
pub(crate) tests: Vec<Test>,
}
#[derive(Serialize, Deserialize)]
pub struct Test {
pub(crate) tester: Option<String>,
pub(crate) rating: i8,
pub(crate) details: Option<String>,
pub(crate) cpu: String,
pub(crate) gpu: String,
pub(crate) version: String,
pub(crate) os: String,
pub(crate) from_yuzu: bool,
pub tester: Option<String>,
pub rating: i8,
pub details: Option<String>,
pub test_date: String,
pub cpu: String,
pub gpu: String,
pub version: String,
pub os: String,
pub from_yuzu: bool,
}
pub fn testcase_to_test(case: &TestCase) -> Test {
@ -35,6 +36,7 @@ pub fn testcase_to_test(case: &TestCase) -> Test {
_ => unreachable!()
},
details: None,
test_date: case.date.clone(),
cpu: case.cpu.clone(),
gpu: case.gpu.clone(),
version: case.version.clone(),