1
0
Fork 0

Use env-configurable hostname to reference our own API.

liquidsoap-2.2
Icedream 2022-09-11 02:33:17 +02:00
parent 07cb70be1a
commit 2dcc435b32
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# Our Denon StagelinQ receiver will send the metadata to this interface. # Our Denon StagelinQ receiver will send the metadata to this interface.
# For fun, I tested this code with the port set to 1608 to emulate the OBS Tuna plugin's HTTP interface, and that works well! # For fun, I tested this code with the port set to 1608 to emulate the OBS Tuna plugin's HTTP interface, and that works well!
#metadata_api_port = 1608 # Emulate Tuna API metadata_api_hostname = getenv(default="icedream-bitwave", "METADATA_API_HOSTNAME")
def http_export_meta(~compact=false, ~json5=false, m) = def http_export_meta(~compact=false, ~json5=false, m) =
j = json() j = json()
@ -23,7 +23,7 @@ def setup_harbor_metadata_api(~metadata_api_port=21338, s) =
has_cover_url = list.assoc.mem("cover_url", m) has_cover_url = list.assoc.mem("cover_url", m)
if has_cover and not has_cover_url then if has_cover and not has_cover_url then
m = list.append(m, [ m = list.append(m, [
("cover_url", "http://icedream-bitwave:#{metadata_api_port}/#{url.encode(id)}/cover") ("cover_url", "http://#{metadata_api_hostname}:#{metadata_api_port}/#{url.encode(id)}/cover")
]) ])
end end