Fix Merge-issues

This commit is contained in:
LordGrey 2021-05-02 22:03:46 +02:00
parent 9ea40a873e
commit c646b0b49c
2 changed files with 14 additions and 24 deletions

View File

@ -362,6 +362,7 @@
"edt_conf_general_port_title": "Port", "edt_conf_general_port_title": "Port",
"edt_conf_general_priority_expl": "The priority of this component", "edt_conf_general_priority_expl": "The priority of this component",
"edt_conf_general_priority_title": "Priority channel", "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_expl": "Enables the screen capture for this led hardware instance",
"edt_conf_instC_systemEnable_title": "Enable screen capture", "edt_conf_instC_systemEnable_title": "Enable screen capture",
"edt_conf_instC_v4lEnable_expl": "Enables the USB capture for this led hardware instance", "edt_conf_instC_v4lEnable_expl": "Enables the USB capture for this led hardware instance",

View File

@ -909,36 +909,25 @@ void JsonAPI::handleSchemaGetCommand(const QJsonObject &message, const QString &
properties.insert("alldevices", alldevices); properties.insert("alldevices", alldevices);
// collect all available effect schemas // collect all available effect schemas
QJsonObject pyEffectSchemas, pyEffectSchema; QJsonArray schemaList;
QJsonArray in, ex; const std::list<EffectSchema>& effectsSchemas = _hyperion->getEffectSchemas();
const std::list<EffectSchema> &effectsSchemas = _hyperion->getEffectSchemas(); for (const EffectSchema& effectSchema : effectsSchemas)
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; schema.insert("type", "system");
internal.insert("script", effectSchema.pyFile);
internal.insert("schemaLocation", effectSchema.schemaFile);
internal.insert("schemaContent", effectSchema.pySchema);
in.append(internal);
} }
else else
{ {
QJsonObject external; schema.insert("type", "custom");
external.insert("script", effectSchema.pyFile);
external.insert("schemaLocation", effectSchema.schemaFile);
external.insert("schemaContent", effectSchema.pySchema);
ex.append(external);
} }
schemaList.append(schema);
} }
properties.insert("effectSchemas", schemaList);
if (!in.empty())
pyEffectSchema.insert("internal", in);
if (!ex.empty())
pyEffectSchema.insert("external", ex);
pyEffectSchemas = pyEffectSchema;
properties.insert("effectSchemas", pyEffectSchemas);
schemaJson.insert("properties", properties); schemaJson.insert("properties", properties);