mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add repo name to installer
This commit is contained in:
parent
1c593f8350
commit
078dea73fc
3 changed files with 13 additions and 2 deletions
|
|
@ -77,5 +77,10 @@ namespace Dalamud.Plugin
|
|||
/// The last time this plugin was updated.
|
||||
/// </summary>
|
||||
public long LastUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Domain of the origin repo
|
||||
/// </summary>
|
||||
public string FromRepo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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<List<PluginDefinition>>(data);
|
||||
var host = new Uri(repo).Host;
|
||||
|
||||
foreach (var pluginDefinition in unsortedPluginMaster) {
|
||||
pluginDefinition.FromRepo = host;
|
||||
}
|
||||
|
||||
allPlugins.AddRange(unsortedPluginMaster);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue