-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Even more updater optimisations + refactors
- Revert GetLatestReleaseAsync back to returning single release instead of most recent releases - Refactor update download/extract/install process to use async methods instead of BackgroundWorker - Remove unneccesary exception type checks, left over from when we were still using Octokit - Query latest release directly if we don't need the latest pre-release - Use HttpClient instead of deprecated WebClient for update downloads - Add API error handling for authentication and rate limit errors - Other minor optimisations, mostly relating to variable names
- Loading branch information
1 parent
7a83b3a
commit 6b5fac7
Showing
9 changed files
with
267 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// This file is part of YAMDCC (Yet Another MSI Dragon Center Clone). | ||
// Copyright © Sparronator9999 and Contributors 2025. | ||
// | ||
// YAMDCC is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) | ||
// any later version. | ||
// | ||
// YAMDCC is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
// more details. | ||
// | ||
// You should have received a copy of the GNU General Public License along with | ||
// YAMDCC. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace YAMDCC.Updater.GitHubApi; | ||
|
||
// suppress warning about default values never getting overwritten | ||
// since they get populated when deserialising JSON to these classes | ||
#pragma warning disable CS0649 | ||
internal class ApiError | ||
{ | ||
[JsonProperty("message")] | ||
public string Message; | ||
|
||
[JsonProperty("documentation_url")] | ||
public string DocsUrl; | ||
|
||
[JsonProperty("status")] | ||
public string Status; | ||
} | ||
#pragma warning restore CS0649 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.