Browse Source

Check for status = available in manifests

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
a976c831d9
2 changed files with 12 additions and 2 deletions
  1. +2
    -2
      src/app/app.cpp
  2. +10
    -0
      src/plugin.cpp

+ 2
- 2
src/app/app.cpp View File

@@ -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;


+ 10
- 0
src/plugin.cpp View File

@@ -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) {


Loading…
Cancel
Save