From 7bd4beb82d4db60dda8812f7149fff76539f5a8b Mon Sep 17 00:00:00 2001 From: Jack Bishop Date: Mon, 10 Jan 2022 17:02:42 +0000 Subject: [PATCH 1/2] update plugin query to new endpoint --- Torch.API/WebAPI/PluginQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Torch.API/WebAPI/PluginQuery.cs b/Torch.API/WebAPI/PluginQuery.cs index 61dcf6a..ad6d481 100644 --- a/Torch.API/WebAPI/PluginQuery.cs +++ b/Torch.API/WebAPI/PluginQuery.cs @@ -12,7 +12,7 @@ namespace Torch.API.WebAPI { public class PluginQuery { - private const string ALL_QUERY = "https://torchapi.net/api/plugins"; + private const string ALL_QUERY = "https://torchapi.com/api/plugins"; private const string PLUGIN_QUERY = "https://torchapi.net/api/plugins/{0}"; private readonly HttpClient _client; private static readonly Logger Log = LogManager.GetCurrentClassLogger(); From 4f9af817a51eeb4831254d58d1193ca6185ab0ec Mon Sep 17 00:00:00 2001 From: Jack Bishop Date: Fri, 14 Jan 2022 02:31:51 +0000 Subject: [PATCH 2/2] phase-1 changes --- Torch.API/WebAPI/PluginQuery.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Torch.API/WebAPI/PluginQuery.cs b/Torch.API/WebAPI/PluginQuery.cs index ad6d481..60af524 100644 --- a/Torch.API/WebAPI/PluginQuery.cs +++ b/Torch.API/WebAPI/PluginQuery.cs @@ -13,7 +13,7 @@ namespace Torch.API.WebAPI public class PluginQuery { private const string ALL_QUERY = "https://torchapi.com/api/plugins"; - private const string PLUGIN_QUERY = "https://torchapi.net/api/plugins/{0}"; + private const string PLUGIN_QUERY = "https://torchapi.com/api/plugins/item/{0}"; private readonly HttpClient _client; private static readonly Logger Log = LogManager.GetCurrentClassLogger(); @@ -87,6 +87,7 @@ namespace Torch.API.WebAPI public async Task DownloadPlugin(string guid, string path = null) { var item = await QueryOne(guid); + if (item == null) return false; return await DownloadPlugin(item, path); }