diff --git a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs index e8826e333..43661c9ab 100644 --- a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs +++ b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs @@ -43,6 +43,7 @@ namespace Dalamud.Interface.Internal.Windows public const int PluginIconHeight = 512; private const string MainRepoImageUrl = "https://raw.githubusercontent.com/goatcorp/DalamudPlugins/api6/{0}/{1}/images/{2}"; + private const string MainRepoDip17ImageUrl = "https://raw.githubusercontent.com/goatcorp/PluginDistD17/main/{0}/{1}/images/{2}"; private readonly BlockingCollection>> downloadQueue = new(); private readonly BlockingCollection> loadQueue = new(); @@ -653,6 +654,9 @@ namespace Dalamud.Interface.Internal.Windows if (isThirdParty) return manifest.IconUrl; + if (manifest.IsDip17Plugin) + return MainRepoDip17ImageUrl.Format(manifest.Dip17Channel!, manifest.InternalName, "icon.png"); + return MainRepoImageUrl.Format(isTesting ? "testing" : "plugins", manifest.InternalName, "icon.png"); } @@ -672,7 +676,14 @@ namespace Dalamud.Interface.Internal.Windows var output = new List(); for (var i = 1; i <= 5; i++) { - output.Add(MainRepoImageUrl.Format(isTesting ? "testing" : "plugins", manifest.InternalName, $"image{i}.png")); + if (manifest.IsDip17Plugin) + { + output.Add(MainRepoDip17ImageUrl.Format(manifest.Dip17Channel!, manifest.InternalName, $"image{i}.png")); + } + else + { + output.Add(MainRepoImageUrl.Format(isTesting ? "testing" : "plugins", manifest.InternalName, $"image{i}.png")); + } } return output; diff --git a/Dalamud/Plugin/Internal/Types/PluginManifest.cs b/Dalamud/Plugin/Internal/Types/PluginManifest.cs index c4d712a90..a1b0e6a71 100644 --- a/Dalamud/Plugin/Internal/Types/PluginManifest.cs +++ b/Dalamud/Plugin/Internal/Types/PluginManifest.cs @@ -181,4 +181,17 @@ internal record PluginManifest /// Gets a message that is shown to users when sending feedback. /// public string? FeedbackMessage { get; init; } + + /// + /// Gets a value indicating whether this plugin is DIP17. + /// To be removed. + /// + [JsonProperty("_isDip17Plugin")] + public bool IsDip17Plugin { get; init; } = false; + + /// + /// Gets the DIP17 channel name. + /// + [JsonProperty("_Dip17Channel")] + public string? Dip17Channel { get; init; } }