Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit f0b443a

Browse files
author
HyperPolygon64
committed
Use GitHub for primary server
modified: Unleashed-Mod-Manager/src/Environment3/RushInterface.cs
1 parent f233dba commit f0b443a

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

Unleashed-Mod-Manager/src/Environment3/RushInterface.cs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,7 @@ private void LoadSettings()
183183

184184
if (CheckBox_CheckUpdatesOnLaunch.Checked = Properties.Settings.Default.General_CheckUpdatesOnLaunch) {
185185
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
186-
try { CheckForUpdates(Properties.Resources.VersionURI_SEGACarnival, Properties.Resources.ChangelogsURI_SEGACarnival); }
187-
catch {
188-
try { CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub); }
189-
catch (Exception ex) {
190-
Label_UpdaterStatus.Text = "Connection error";
191-
PictureBox_UpdaterIcon.BackgroundImage = Properties.Resources.Exception_Logo;
192-
RichTextBox_Changelogs.Text = $"Failed to request changelogs...\n\n{ex}";
193-
}
194-
}
186+
CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub);
195187
}
196188

197189
if (CheckBox_SaveFileRedirection.Checked = Properties.Settings.Default.General_SaveFileRedirection) {
@@ -370,8 +362,8 @@ private async void CheckForUpdates(string versionURI, string changelogsURI) {
370362
throw new WebException();
371363
} catch {
372364
try {
373-
// Check for updates via GitHub
374-
CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub);
365+
// Check for updates via SEGA Carnival
366+
CheckForUpdates(Properties.Resources.VersionURI_SEGACarnival, Properties.Resources.ChangelogsURI_SEGACarnival);
375367
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
376368
_useBackupServer = true;
377369
} catch (Exception ex) {
@@ -1156,8 +1148,8 @@ private void UpdateVersion(bool useBackupServer) {
11561148

11571149
try {
11581150
// If SEGA Carnival is offline, use GitHub
1159-
Uri serverUri = new Uri(Properties.Resources.DataURI_SEGACarnival);
1160-
if (useBackupServer) serverUri = new Uri(Properties.Resources.DataURI_GitHub);
1151+
Uri serverUri = new Uri(Properties.Resources.DataURI_GitHub);
1152+
if (useBackupServer) serverUri = new Uri(Properties.Resources.DataURI_SEGACarnival);
11611153

11621154
using (WebClient client = new WebClient()) {
11631155
client.DownloadProgressChanged += (s, clientEventArgs) => { ProgressBar_SoftwareUpdate.Value = clientEventArgs.ProgressPercentage; };
@@ -1217,8 +1209,8 @@ private void ListView_ModUpdates_ItemChecked(object sender, ItemCheckedEventArgs
12171209
private async void SectionButton_Updates_Click(object sender, EventArgs e) {
12181210
// Check for software updates is clicked
12191211
if (sender == SectionButton_CheckForSoftwareUpdates) {
1220-
// Check for updates via SEGA Carnival
1221-
CheckForUpdates(Properties.Resources.VersionURI_SEGACarnival, Properties.Resources.ChangelogsURI_SEGACarnival);
1212+
// Check for updates via GitHub
1213+
CheckForUpdates(Properties.Resources.VersionURI_GitHub, Properties.Resources.ChangelogsURI_GitHub);
12221214
Properties.Settings.Default.General_LastSoftwareUpdate = DateTime.Now.Ticks;
12231215
if (((SectionButton)sender).SectionText == "Fetch the latest version") UpdateVersion(_useBackupServer); // Update if prompted
12241216
Properties.Settings.Default.Save();

0 commit comments

Comments
 (0)