From 0f8f3246b8d015fb37dbad50f30105929d871a24 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 28 Mar 2018 01:52:25 -0400 Subject: [PATCH] Check for status = available in manifests --- src/app/app.cpp | 4 ++-- src/plugin.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 32454b5f..c49ee550 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -5,8 +5,8 @@ namespace rack { std::string gApplicationName = "VCV Rack"; std::string gApplicationVersion = TOSTRING(VERSION); -// std::string gApiHost = "https://api.vcvrack.com"; -std::string gApiHost = "http://localhost:8081"; +std::string gApiHost = "https://api.vcvrack.com"; +// std::string gApiHost = "http://localhost:8081"; RackWidget *gRackWidget = NULL; Toolbar *gToolbar = NULL; diff --git a/src/plugin.cpp b/src/plugin.cpp index 1a42ceaf..a977581f 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -127,6 +127,16 @@ static bool loadPlugin(std::string path) { } static bool syncPlugin(std::string slug, json_t *manifestJ, bool dryRun) { + // Check that "status" is "available" + json_t *statusJ = json_object_get(manifestJ, "status"); + if (!statusJ) { + return false; + } + std::string status = json_string_value(statusJ); + if (status != "available") { + return false; + } + // Get latest version json_t *latestVersionJ = json_object_get(manifestJ, "latestVersion"); if (!latestVersionJ) {