mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
fix: correctly download plugins after 3rd party changes
This commit is contained in:
parent
078dea73fc
commit
eaecea0abc
2 changed files with 22 additions and 4 deletions
|
|
@ -82,5 +82,20 @@ namespace Dalamud.Plugin
|
|||
/// Domain of the origin repo
|
||||
/// </summary>
|
||||
public string FromRepo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Download link used to install the plugin.
|
||||
/// </summary>
|
||||
public string DownloadLinkInstall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Download link used to update the plugin.
|
||||
/// </summary>
|
||||
public string DownloadLinkUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Download link used to get testing versions of the plugin.
|
||||
/// </summary>
|
||||
public string DownloadLinkTesting { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ using Serilog;
|
|||
|
||||
namespace Dalamud.Plugin
|
||||
{
|
||||
internal class PluginRepository {
|
||||
private string PluginFunctionBaseUrl => "https://us-central1-xl-functions.cloudfunctions.net/download-plugin/?plugin={0}&isUpdate={1}&isTesting={2}";
|
||||
internal class PluginRepository {
|
||||
private string PluginMasterUrl => "https://goatcorp.github.io/DalamudPlugins/pluginmaster.json";
|
||||
|
||||
private readonly Dalamud dalamud;
|
||||
|
|
@ -117,8 +116,12 @@ namespace Dalamud.Plugin
|
|||
&& fromTesting) {
|
||||
doTestingDownload = testingAssemblyVer > Version.Parse(definition.AssemblyVersion) || definition.IsTestingExclusive;
|
||||
}
|
||||
|
||||
var url = string.Format(PluginFunctionBaseUrl, definition.InternalName, isUpdate, doTestingDownload);
|
||||
|
||||
var url = definition.DownloadLinkInstall;
|
||||
if (doTestingDownload)
|
||||
url = definition.DownloadLinkTesting;
|
||||
else if (isUpdate)
|
||||
url = definition.DownloadLinkUpdate;
|
||||
|
||||
Log.Information("Downloading plugin to {0} from {1} doTestingDownload:{2} isTestingExclusive:{3}", path, url, doTestingDownload, definition.IsTestingExclusive);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue