mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
chore: temporary workaround for DIP17 plugins
This commit is contained in:
parent
98e421a227
commit
530f2a8b66
2 changed files with 25 additions and 1 deletions
|
|
@ -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<Tuple<ulong, Func<Task>>> downloadQueue = new();
|
||||
private readonly BlockingCollection<Func<Task>> 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<string>();
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -181,4 +181,17 @@ internal record PluginManifest
|
|||
/// Gets a message that is shown to users when sending feedback.
|
||||
/// </summary>
|
||||
public string? FeedbackMessage { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this plugin is DIP17.
|
||||
/// To be removed.
|
||||
/// </summary>
|
||||
[JsonProperty("_isDip17Plugin")]
|
||||
public bool IsDip17Plugin { get; init; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the DIP17 channel name.
|
||||
/// </summary>
|
||||
[JsonProperty("_Dip17Channel")]
|
||||
public string? Dip17Channel { get; init; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue