diff --git a/Dalamud/Plugin/PluginDefinition.cs b/Dalamud/Plugin/PluginDefinition.cs index e5c50bdf6..8fdba6af3 100644 --- a/Dalamud/Plugin/PluginDefinition.cs +++ b/Dalamud/Plugin/PluginDefinition.cs @@ -77,5 +77,10 @@ namespace Dalamud.Plugin /// The last time this plugin was updated. /// public long LastUpdate { get; set; } + + /// + /// Domain of the origin repo + /// + public string FromRepo { get; set; } } } diff --git a/Dalamud/Plugin/PluginInstallerWindow.cs b/Dalamud/Plugin/PluginInstallerWindow.cs index 30fc5bd32..abcea773a 100644 --- a/Dalamud/Plugin/PluginInstallerWindow.cs +++ b/Dalamud/Plugin/PluginInstallerWindow.cs @@ -323,7 +323,7 @@ namespace Dalamud.Plugin ImGui.Text(pluginDefinition.Name); ImGui.SameLine(); ImGui.TextColored(new Vector4(0.5f, 0.5f, 0.5f, 1.0f), - $" by {pluginDefinition.Author}, {pluginDefinition.DownloadCount} downloads"); + $" by {pluginDefinition.Author}, {pluginDefinition.DownloadCount} downloads{(pluginDefinition.FromRepo != "goatcorp.github.io" ? $", from {pluginDefinition.FromRepo}" : string.Empty)}"); ImGui.Text(pluginDefinition.Description); diff --git a/Dalamud/Plugin/PluginRepository.cs b/Dalamud/Plugin/PluginRepository.cs index 1612ed8ea..0ecb070ba 100644 --- a/Dalamud/Plugin/PluginRepository.cs +++ b/Dalamud/Plugin/PluginRepository.cs @@ -15,7 +15,7 @@ namespace Dalamud.Plugin { internal class PluginRepository { private string PluginFunctionBaseUrl => "https://us-central1-xl-functions.cloudfunctions.net/download-plugin/?plugin={0}&isUpdate={1}&isTesting={2}"; - private string PluginMasterUrl => "https://raw.githubusercontent.com/goatcorp/DalamudPlugins/master/pluginmaster.json"; + private string PluginMasterUrl => "https://goatcorp.github.io/DalamudPlugins/pluginmaster.json"; private readonly Dalamud dalamud; private string pluginDirectory; @@ -58,6 +58,12 @@ namespace Dalamud.Plugin var data = client.DownloadString(repo); var unsortedPluginMaster = JsonConvert.DeserializeObject>(data); + var host = new Uri(repo).Host; + + foreach (var pluginDefinition in unsortedPluginMaster) { + pluginDefinition.FromRepo = host; + } + allPlugins.AddRange(unsortedPluginMaster); }