Skip to content
Snippets Groups Projects
Commit 6be5a453 authored by David Trattnig's avatar David Trattnig
Browse files

Add config update options for station fallback

parent c82f14a3
No related branches found
No related tags found
1 merge request!3Liquidsoap 2 migration
......@@ -101,24 +101,36 @@ server.register(namespace="aura_engine",
# Updates engine config
server.register(namespace="aura_engine",
description="Updates the engine configuration",
usage="update_config { \"engine_id\": \"1\", \"engine_api_playlog\": \
\"http://127.0.0.1:8008/api/v1/playlog\" }",
usage="update_config { \
\"engine_id\": \"1\", \
\"engine_api_playlog\": \"http://127.0.0.1:8008/api/v1/playlog\" \
\"fallback_show_id\": \"-1\" \
\"fallback_show_name\": \"Station Fallback\" \
}",
"update_config",
fun (s) -> begin
log("Received JSON to update config: #{s}")
let json.parse (data : {
engine_id: string,
engine_api_playlog: string
engine_id: int,
engine_api_playlog: string,
fallback_show_id: int,
fallback_show_name: string
}) = s
engine_id := data.engine_id
engine_id := "#{data.engine_id}"
log("Set Engine ID to '#{!engine_id}'")
engine_api_playlog := data.engine_api_playlog
log("Set Engine API Playlog URL to '#{!engine_api_playlog}'")
engine_fallback_show_id := "#{data.fallback_show_id}"
log("Set Fallback Show ID to '#{!engine_fallback_show_id}'")
engine_fallback_show_name := data.fallback_show_name
log("Set Fallback Show Name to '#{!engine_fallback_show_name}'")
"OK"
end
)
# Get version
server.register(namespace="aura_engine",
description="Returns the version of Engine Core",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment