From fb775feff6bc65cc539a3416987ba0acb242ef7e Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Thu, 4 May 2023 12:58:44 +0200 Subject: [PATCH] 1.1.5 - added patch repositories mirrors --- Cargo.toml | 2 +- src/genshin/config/schema/patch.rs | 6 ++++++ src/honkai/config/schema/patch.rs | 6 ++++++ src/star_rail/config/schema/patch.rs | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b392dd8..1d59688 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anime-launcher-sdk" -version = "1.1.4" +version = "1.1.5" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" diff --git a/src/genshin/config/schema/patch.rs b/src/genshin/config/schema/patch.rs index 033edbc..1790ccb 100644 --- a/src/genshin/config/schema/patch.rs +++ b/src/genshin/config/schema/patch.rs @@ -22,6 +22,7 @@ impl Default for Patch { path: launcher_dir.join("patch"), servers: vec![ + String::from("https://codeberg.org/an-anime-team/dawn"), String::from("https://notabug.org/Krock/dawn") ], @@ -57,6 +58,11 @@ impl From<&JsonValue> for Patch { } } + // Add repository mirror if it's not here (so old default installation) + if servers.as_ref() == ["https://notabug.org/Krock/dawn"] { + servers = default.servers; + } + servers }, None => default.servers diff --git a/src/honkai/config/schema/patch.rs b/src/honkai/config/schema/patch.rs index d472b38..855763b 100644 --- a/src/honkai/config/schema/patch.rs +++ b/src/honkai/config/schema/patch.rs @@ -22,6 +22,7 @@ impl Default for Patch { path: launcher_dir.join("patch"), servers: vec![ + String::from("https://codeberg.org/an-anime-team/dusk"), String::from("https://notabug.org/mkrsym1/dusk") ], @@ -57,6 +58,11 @@ impl From<&JsonValue> for Patch { } } + // Add repository mirror if it's not here (so old default installation) + if servers.as_ref() == ["https://notabug.org/mkrsym1/dusk"] { + servers = default.servers; + } + servers }, None => default.servers diff --git a/src/star_rail/config/schema/patch.rs b/src/star_rail/config/schema/patch.rs index 31bce38..1f18069 100644 --- a/src/star_rail/config/schema/patch.rs +++ b/src/star_rail/config/schema/patch.rs @@ -21,6 +21,7 @@ impl Default for Patch { path: launcher_dir.join("patch"), servers: vec![ + String::from("https://codeberg.org/an-anime-team/astra"), String::from("https://notabug.org/mkrsym1/astra") ], @@ -54,6 +55,11 @@ impl From<&JsonValue> for Patch { } } + // Add repository mirror if it's not here (so old default installation) + if servers.as_ref() == ["https://notabug.org/mkrsym1/astra"] { + servers = default.servers; + } + servers }, None => default.servers