summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 21:54:00 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-25 21:54:00 -0400
commit211f89821e34bb55a6266384d9bac68ec0c64744 (patch)
treeaa0d9915b01aad436ed6b1a2028602c048666457 /src/SMAPI.Web/Controllers
parent80d3dd1f786f7e5846f9adb7f7a4d82e5b9b92fd (diff)
parent31ac964a8b19623b0472931403a33d51db6fb271 (diff)
downloadSMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.tar.gz
SMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.tar.bz2
SMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index 1956bf29..c6e9a713 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -123,6 +123,10 @@ namespace StardewModdingAPI.Web.Controllers
ModOverrideConfig overrides = this.Config.Value.ModOverrides.FirstOrDefault(p => p.ID.Equals(search.ID?.Trim(), StringComparison.OrdinalIgnoreCase));
bool allowNonStandardVersions = overrides?.AllowNonStandardVersions ?? false;
+ // SMAPI versions with a '-beta' tag indicate major changes that may need beta mod versions.
+ // This doesn't apply to normal prerelease versions which have an '-alpha' tag.
+ bool isSmapiBeta = apiVersion.IsPrerelease() && apiVersion.PrereleaseTag.StartsWith("beta");
+
// get latest versions
ModEntryModel result = new ModEntryModel { ID = search.ID };
IList<string> errors = new List<string>();
@@ -198,7 +202,7 @@ namespace StardewModdingAPI.Web.Controllers
List<ModEntryVersionModel> updates = new List<ModEntryVersionModel>();
if (this.IsRecommendedUpdate(installedVersion, main?.Version, useBetaChannel: true))
updates.Add(main);
- if (this.IsRecommendedUpdate(installedVersion, optional?.Version, useBetaChannel: installedVersion.IsPrerelease() || search.IsBroken))
+ if (this.IsRecommendedUpdate(installedVersion, optional?.Version, useBetaChannel: isSmapiBeta || installedVersion.IsPrerelease() || search.IsBroken))
updates.Add(optional);
if (this.IsRecommendedUpdate(installedVersion, unofficial?.Version, useBetaChannel: true))
updates.Add(unofficial);