diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json index 44ff0ed3..95e46c8d 100644 --- a/assets/webconfig/i18n/en.json +++ b/assets/webconfig/i18n/en.json @@ -362,6 +362,7 @@ "edt_conf_general_port_title": "Port", "edt_conf_general_priority_expl": "The priority of this component", "edt_conf_general_priority_title": "Priority channel", + "edt_conf_grabber_discovered_none": "No Devices Discovered", "edt_conf_instC_systemEnable_expl": "Enables the screen capture for this led hardware instance", "edt_conf_instC_systemEnable_title": "Enable screen capture", "edt_conf_instC_v4lEnable_expl": "Enables the USB capture for this led hardware instance", @@ -996,4 +997,4 @@ "wiz_yeelight_intro1": "This wizards configures Hyperion for the Yeelight system. Features are the Yeelighs' auto detection, setting each light to a specific position on your picture or disable it and tune the Hyperion settings automatically! So in short: All you need are some clicks and you are done!", "wiz_yeelight_title": "Yeelight Wizard", "wiz_yeelight_unsupported": "Unsupported" -} \ No newline at end of file +} diff --git a/libsrc/api/JsonAPI.cpp b/libsrc/api/JsonAPI.cpp index 6f90b362..09386220 100644 --- a/libsrc/api/JsonAPI.cpp +++ b/libsrc/api/JsonAPI.cpp @@ -909,36 +909,25 @@ void JsonAPI::handleSchemaGetCommand(const QJsonObject &message, const QString & properties.insert("alldevices", alldevices); // collect all available effect schemas - QJsonObject pyEffectSchemas, pyEffectSchema; - QJsonArray in, ex; - const std::list &effectsSchemas = _hyperion->getEffectSchemas(); - for (const EffectSchema &effectSchema : effectsSchemas) + QJsonArray schemaList; + const std::list& effectsSchemas = _hyperion->getEffectSchemas(); + for (const EffectSchema& effectSchema : effectsSchemas) { - if (effectSchema.pyFile.mid(0, 1) == ":") + QJsonObject schema; + schema.insert("script", effectSchema.pyFile); + schema.insert("schemaLocation", effectSchema.schemaFile); + schema.insert("schemaContent", effectSchema.pySchema); + if (effectSchema.pyFile.startsWith(':')) { - QJsonObject internal; - internal.insert("script", effectSchema.pyFile); - internal.insert("schemaLocation", effectSchema.schemaFile); - internal.insert("schemaContent", effectSchema.pySchema); - in.append(internal); + schema.insert("type", "system"); } else { - QJsonObject external; - external.insert("script", effectSchema.pyFile); - external.insert("schemaLocation", effectSchema.schemaFile); - external.insert("schemaContent", effectSchema.pySchema); - ex.append(external); + schema.insert("type", "custom"); } + schemaList.append(schema); } - - if (!in.empty()) - pyEffectSchema.insert("internal", in); - if (!ex.empty()) - pyEffectSchema.insert("external", ex); - - pyEffectSchemas = pyEffectSchema; - properties.insert("effectSchemas", pyEffectSchemas); + properties.insert("effectSchemas", schemaList); schemaJson.insert("properties", properties);