Skip to content

Commit

Permalink
Fix GitHub mirror url
Browse files Browse the repository at this point in the history
  • Loading branch information
0blu committed Nov 10, 2023
1 parent 9968f8b commit db521f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions WinterspringLauncher/LauncherConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class VersionedBaseConfig
public class LauncherConfig : VersionedBaseConfig
{
public string LauncherLanguage { get; set; } = "en";
public string? GitHubMirror { get; set; } = null; // example "https://asia.cdn.everlook-wow.net/github-mirror/" + "/repos/{repoName}/releases/latest"
public string? GitHubApiMirror { get; set; } = null; // example "http://asia.cdn.everlook.aclon.cn/github-mirror/api/" + "/repos/{repoName}/releases/latest"
public string LastSelectedServerName { get; set; } = "";
public bool CheckForLauncherUpdates { get; set; } = true;
public bool CheckForHermesUpdates { get; set; } = true;
Expand Down Expand Up @@ -175,7 +175,7 @@ private static string PatchConfigIfNeeded(string currentConfig)
{
var knownServer = v2Config.KnownServers.First(g => g.RealmlistAddress.Contains("everlook-wow", StringComparison.InvariantCultureIgnoreCase));
var knownInstallation = v2Config.GameInstallations.First(g => g.Key == knownServer.UsedInstallation);
v2Config.GitHubMirror = "https://asia.cdn.everlook-wow.net/github-mirror/api/";
v2Config.GitHubApiMirror = "http://asia.cdn.everlook.aclon.cn/github-mirror/api/";
v2Config.LastSelectedServerName = knownServer.Name;
TryUpgradeOldGameFolder(knownInstallation.Value.Directory, v1Config.GamePath);
}
Expand Down
6 changes: 3 additions & 3 deletions WinterspringLauncher/LauncherLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public LauncherLogic(MainWindowViewModel model)
if (_config.LastSelectedServerName == "") // first configuration
{
_config.LastSelectedServerName = LocaleDefaults.GetBestServerName();
_config.GitHubMirror = LocaleDefaults.GetBestGitHubMirror();
_config.GitHubApiMirror = LocaleDefaults.GetBestGitHubMirror();
}

if (_config.GitHubMirror != null)
GitHubApi.GitHubApiAddress = _config.GitHubMirror;
if (_config.GitHubApiMirror != null)
GitHubApi.GitHubApiAddress = _config.GitHubApiMirror;

for (var i = 0; i < _config.KnownServers.Length; i++)
{
Expand Down

0 comments on commit db521f6

Please sign in to comment.