diff --git a/StabilityMatrix.Core/Updater/UpdateHelper.cs b/StabilityMatrix.Core/Updater/UpdateHelper.cs index 7ca9586f4..0bc2a1866 100644 --- a/StabilityMatrix.Core/Updater/UpdateHelper.cs +++ b/StabilityMatrix.Core/Updater/UpdateHelper.cs @@ -150,7 +150,11 @@ await response.Content.ReadAsStreamAsync().ConfigureAwait(false), foreach ( var channel in Enum.GetValues(typeof(UpdateChannel)) .Cast() - .Where(c => c > UpdateChannel.Unknown) + .Where( + c => + c > UpdateChannel.Unknown + && c <= settingsManager.Settings.PreferredUpdateChannel + ) ) { if ( @@ -202,6 +206,12 @@ private bool ValidateUpdate(UpdateInfo? update) // Same version available, check if we both have commit hash metadata var updateHash = update.Version.Metadata; var appHash = Compat.AppVersion.Metadata; + + // Trim both to the lower length, to a minimum of 7 characters + var minLength = Math.Min(7, Math.Min(updateHash.Length, appHash.Length)); + updateHash = updateHash[..minLength]; + appHash = appHash[..minLength]; + // If different, we can update if (updateHash != appHash) {