summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Startup.cs
diff options
context:
space:
mode:
authorJamie Taylor <Jamie.Taylor@pobox.com>2022-10-01 21:09:39 -0400
committerJamie Taylor <Jamie.Taylor@pobox.com>2022-10-01 21:30:14 -0400
commit83aec980b3ee739fb4bc251217556b3ae44f741b (patch)
treeafa8c91eb20cf56ed2cb35563ba3bd2d1e4c8a46 /src/SMAPI.Web/Startup.cs
parent6d4eed56b1d80d02db773b0cd2f372baec6b2d1b (diff)
downloadSMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.tar.gz
SMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.tar.bz2
SMAPI-83aec980b3ee739fb4bc251217556b3ae44f741b.zip
Add UpdateManifest site type.
Adds the UpdateManifest site key and associated client. This required some additional features in the existing update machinery. Each "version" can now (optionally) have its own download URL. Mod Page objects can now specify that subkey matching (for that page) should be "strict". A strict subkey match does not fall back to matching with no subkey if a subkey was provided but produced no versions. It also strips the leading '@' from the subkey. IModDownload objects are now responsible for deciding whether a subkey matches or not. The default behavior is unchanged, but this allows different mod sites to have different rules for subkey matching (which the UpdateManifest mod site uses to force exact matches).
Diffstat (limited to 'src/SMAPI.Web/Startup.cs')
-rw-r--r--src/SMAPI.Web/Startup.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index 54c25979..a068a998 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -20,6 +20,7 @@ using StardewModdingAPI.Web.Framework.Clients.GitHub;
using StardewModdingAPI.Web.Framework.Clients.ModDrop;
using StardewModdingAPI.Web.Framework.Clients.Nexus;
using StardewModdingAPI.Web.Framework.Clients.Pastebin;
+using StardewModdingAPI.Web.Framework.Clients.UpdateManifest;
using StardewModdingAPI.Web.Framework.Compression;
using StardewModdingAPI.Web.Framework.ConfigModels;
using StardewModdingAPI.Web.Framework.RedirectRules;
@@ -149,6 +150,8 @@ namespace StardewModdingAPI.Web
baseUrl: api.PastebinBaseUrl,
userAgent: userAgent
));
+
+ services.AddSingleton<IUpdateManifestClient>(new UpdateManifestClient(userAgent: userAgent));
}
// init helpers