From 72935bdbb6314dac0393c5f7737c041f9ae400db Mon Sep 17 00:00:00 2001 From: GreemDev Date: Tue, 3 Jun 2025 02:55:25 -0500 Subject: [PATCH] forgot some things & remove redundant method on github release channel --- src/Ryujinx/Systems/Updater/Updater.GitHub.cs | 10 +++------- src/Ryujinx/Systems/Updater/Updater.GitLab.cs | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Ryujinx/Systems/Updater/Updater.GitHub.cs b/src/Ryujinx/Systems/Updater/Updater.GitHub.cs index d1738183d..f7627ed01 100644 --- a/src/Ryujinx/Systems/Updater/Updater.GitHub.cs +++ b/src/Ryujinx/Systems/Updater/Updater.GitHub.cs @@ -17,8 +17,6 @@ namespace Ryujinx.Ava.Systems internal static partial class Updater { private static GitHubReleaseChannels.Channel? _currentGitHubReleaseChannel; - - private const string GitHubApiUrl = "https://api.github.com"; public static async Task> CheckGitHubVersionAsync(bool showVersionUpToDate = false) { @@ -74,7 +72,7 @@ namespace Ryujinx.Ava.Systems if (userResult is UserResult.Ok) { - OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion)); + OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.UrlFormat.Format(currentVersion)); } } @@ -100,7 +98,7 @@ namespace Ryujinx.Ava.Systems if (userResult is UserResult.Ok) { - OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion)); + OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.UrlFormat.Format(currentVersion)); } } @@ -169,14 +167,12 @@ namespace Ryujinx.Ava.Systems public readonly string Owner; public readonly string Repo; - public string UrlFormat => $"https://github.com/{ToString()}/releases/{0}"; + public string UrlFormat => $"https://github.com/{ToString()}/releases/{{0}}"; public override string ToString() => $"{Owner}/{Repo}"; public string GetLatestReleaseApiUrl() => $"https://api.github.com/repos/{ToString()}/releases/latest"; - - public string GetSpecificReleaseUrl(Version version) => $"https://github.com/{ToString()}/releases/{version}"; } } diff --git a/src/Ryujinx/Systems/Updater/Updater.GitLab.cs b/src/Ryujinx/Systems/Updater/Updater.GitLab.cs index 4e3169dce..093628d1d 100644 --- a/src/Ryujinx/Systems/Updater/Updater.GitLab.cs +++ b/src/Ryujinx/Systems/Updater/Updater.GitLab.cs @@ -77,7 +77,7 @@ namespace Ryujinx.Ava.Systems if (userResult is UserResult.Ok) { - OpenHelper.OpenUrl(_currentGitHubReleaseChannel.Value.GetSpecificReleaseUrl(currentVersion)); + OpenHelper.OpenUrl(_currentGitLabReleaseChannel.UrlFormat.Format(currentVersion)); } }