1
0
Fork 0

Fix cover url not being added to meta output properly.

liquidsoap-2.2
Icedream 2022-09-11 15:45:35 +02:00
parent ce9a344b8b
commit 8f67e17e41
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
1 changed files with 7 additions and 4 deletions

View File

@ -21,10 +21,13 @@ def setup_harbor_metadata_api(~metadata_api_port=21338, s) =
# remove cover info and link to it instead if existing
has_cover = list.assoc.mem("metadata_block_picture", m) or list.assoc.mem("coverart", m)
has_cover_url = list.assoc.mem("cover_url", m)
if has_cover and not has_cover_url then
m = list.append(m, [
("cover_url", "http://#{metadata_api_hostname}:#{metadata_api_port}/#{url.encode(id)}/cover")
])
m = if has_cover and not has_cover_url then
list.add(
("cover_url", "http://#{metadata_api_hostname}:#{metadata_api_port}/#{url.encode(id)}/cover"),
m
)
else
m
end
# data = metadata.json.stringify(compact=true, m)