From dba531ffe2407fad5ea931e922eac4a65ee96a8a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 26 Jan 2023 10:18:57 -0500 Subject: [PATCH] Check that plugin is available for this arch when checking library updates. --- src/library.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/library.cpp b/src/library.cpp index c5691f52..d1c9958d 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -255,7 +255,7 @@ void checkUpdates() { continue; } - // Check if update is needed + // Check that update is needed plugin::Plugin* p = plugin::getPlugin(pluginSlug); if (p) { if (update.version == p->version) @@ -264,9 +264,13 @@ void checkUpdates() { continue; } - // Require that plugin is available - json_t* availableJ = json_object_get(manifestJ, "available"); - if (!json_boolean_value(availableJ)) + // Check that plugin is available for this arch + json_t* archesJ = json_object_get(manifestJ, "arches"); + if (!archesJ) + continue; + std::string arch = APP_OS + "-" + APP_CPU; + json_t* archJ = json_object_get(archesJ, arch.c_str()); + if (!json_boolean_value(archJ)) continue; // Get changelog URL