diff --git a/Cargo.lock b/Cargo.lock index 6905e1b4..dfad44a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2661,9 +2661,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.37.0" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbfb3ddf5364c9cfcd65549a1e7b801d0e8d1b14c1a1590a6408aa93cfbfa84" +checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03" dependencies = [ "memchr", "serde", @@ -3142,9 +3142,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 40bb1a77..d47e184d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ lettre = { version = "0.11.10", default-features = false, features = [ "builder", "smtp-transport", ] } -quick-xml = { version = "0.37.0", features = ["serialize"] } +quick-xml = { version = "0.37.1", features = ["serialize"] } rand = "0.8.5" regex = "1.11.1" reqwest = { version = "0.12.9", default-features = false, features = [ @@ -36,7 +36,7 @@ reqwest = { version = "0.12.9", default-features = false, features = [ ] } rust-argon2 = "2.1.0" serde = { version = "1.0.215", features = ["derive"] } -serde_json = "1.0.132" +serde_json = "1.0.133" sqlx = { version = "0.8.2", features = [ "postgres", "chrono", diff --git a/flake.lock b/flake.lock index b8fcd713..3fbba1ef 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -62,11 +62,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1731464916, - "narHash": "sha256-WZ5rpjr/wCt7yBOUsvDE2i22hYz9g8W921jlwVktRQ4=", + "lastModified": 1731897198, + "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "2c19bad6e881b5a154cafb7f9106879b5b356d1f", + "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5", "type": "github" }, "original": { diff --git a/src/update/dimbreath/gi/texts.rs b/src/update/dimbreath/gi/texts.rs index 78a75b51..b7c02594 100644 --- a/src/update/dimbreath/gi/texts.rs +++ b/src/update/dimbreath/gi/texts.rs @@ -43,10 +43,27 @@ pub async fn update(configs: &Configs, pool: &PgPool) -> anyhow::Result<()> { info!("Starting {}", language); - let text_map: HashMap = - serde_json::from_reader(BufReader::new(File::open(format!( - "dimbreath/AnimeGameData/TextMap/TextMap{language_str}.json", - ))?))?; + let text_map: HashMap = if let Ok(file) = File::open(format!( + "dimbreath/AnimeGameData/TextMap/TextMap{language_str}.json", + )) { + serde_json::from_reader(BufReader::new(file))? + } else { + let mut text_map = HashMap::new(); + + for i in 1.. { + let Ok(file) = File::open(format!( + "dimbreath/AnimeGameData/TextMap/TextMap{language_str}_{i}.json", + )) else { + break; + }; + + let text_map_part: HashMap = + serde_json::from_reader(BufReader::new(file))?; + text_map.extend(text_map_part); + } + + text_map + }; info!("Starting {} achievement series", language); for achievement_goal in &configs.achievement_goal_data {