diff --git a/XLWebServices/Controllers/PluginController.cs b/XLWebServices/Controllers/PluginController.cs index 0d3ca2b..687f30b 100644 --- a/XLWebServices/Controllers/PluginController.cs +++ b/XLWebServices/Controllers/PluginController.cs @@ -110,7 +110,8 @@ public IActionResult PluginMaster([FromQuery] bool proxy = true, [FromQuery] int if (minApiLevel > 0) { - pluginMaster = pluginMaster.Where(manifest => manifest.DalamudApiLevel >= minApiLevel).ToArray(); + pluginMaster = pluginMaster.Where(manifest => manifest.DalamudApiLevel >= minApiLevel || + manifest.TestingDalamudApiLevel >= minApiLevel).ToArray(); } return Content(JsonSerializer.Serialize(pluginMaster), "application/json"); diff --git a/XLWebServices/Services/PluginData/PluginDataService.cs b/XLWebServices/Services/PluginData/PluginDataService.cs index aed1bbd..be79d50 100644 --- a/XLWebServices/Services/PluginData/PluginDataService.cs +++ b/XLWebServices/Services/PluginData/PluginDataService.cs @@ -176,9 +176,12 @@ async Task ProcessPluginsInChannel(Dip17State.Channel channel, string channelNam if (manifest == null) throw new Exception($"Could not fetch manifest for DIP17 plugin: {channelName}/{pluginName}"); - if (manifest.DalamudApiLevel < apiLevel - 2) + if (Math.Max(manifest.DalamudApiLevel, manifest.TestingDalamudApiLevel) < apiLevel - 2) { - _logger.LogInformation("{PluginName} too old, api{Level}", manifest.InternalName, manifest.DalamudApiLevel); + _logger.LogInformation("{PluginName} too old, api{Level} (testing: api{TestingLevel})", + manifest.InternalName, + manifest.DalamudApiLevel, + manifest.TestingDalamudApiLevel); continue; } @@ -228,6 +231,7 @@ async Task ProcessPluginsInChannel(Dip17State.Channel channel, string channelNam if (stableVersion != null) { stableVersion.TestingAssemblyVersion = manifest.AssemblyVersion; + stableVersion.TestingDalamudApiLevel = manifest.DalamudApiLevel; stableVersion.IsTestingExclusive = false; stableVersion.IsDip17Plugin = true; stableVersion.Dip17Channel = channelName; @@ -235,6 +239,7 @@ async Task ProcessPluginsInChannel(Dip17State.Channel channel, string channelNam else { manifest.TestingAssemblyVersion = manifest.AssemblyVersion; + manifest.TestingDalamudApiLevel = manifest.DalamudApiLevel; manifest.IsTestingExclusive = true; pluginMaster.Add(manifest); } diff --git a/XLWebServices/Services/PluginData/PluginManifest.cs b/XLWebServices/Services/PluginData/PluginManifest.cs index ea82232..66faae3 100644 --- a/XLWebServices/Services/PluginData/PluginManifest.cs +++ b/XLWebServices/Services/PluginData/PluginManifest.cs @@ -23,6 +23,7 @@ public PluginManifest(PluginManifest toCopy) this.RepoUrl = toCopy.RepoUrl; this.ApplicableVersion = toCopy.ApplicableVersion; this.DalamudApiLevel = toCopy.DalamudApiLevel; + this.TestingDalamudApiLevel = toCopy.TestingDalamudApiLevel; this.DownloadCount = toCopy.DownloadCount; this.LastUpdate = toCopy.LastUpdate; this.DownloadLinkInstall = toCopy.DownloadLinkInstall; @@ -147,6 +148,14 @@ public PluginManifest(PluginManifest toCopy) /// [JsonPropertyName("DalamudApiLevel")] public int DalamudApiLevel { get; set; } + + /// + /// Gets the API level of this plugin's testing version. For the current API level, please see + /// + /// for the currently used API level. + /// + [JsonPropertyName("TestingDalamudApiLevel")] + public int TestingDalamudApiLevel { get; set; } /// /// Gets the number of downloads this plugin has.