Avoid logging the fallback file in song history.
This commit is contained in:
parent
b98d1600cc
commit
9de8803beb
|
@ -1004,7 +1004,14 @@ final class ConfigWriter implements EventSubscriberInterface
|
||||||
|
|
||||||
$event->appendBlock(
|
$event->appendBlock(
|
||||||
<<<LIQ
|
<<<LIQ
|
||||||
radio = fallback(id="safe_fallback", track_sensitive = false, [radio, single(id="error_jingle", "{$errorFile}")])
|
error_file = single(id="error_jingle", "{$errorFile}")
|
||||||
|
|
||||||
|
def tag_error_file(m) =
|
||||||
|
[("is_error_file", "true")]
|
||||||
|
end
|
||||||
|
error_file = metadata.map(tag_error_file, error_file)
|
||||||
|
|
||||||
|
radio = fallback(id="safe_fallback", track_sensitive = false, [radio, error_file])
|
||||||
LIQ
|
LIQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1016,25 +1023,27 @@ final class ConfigWriter implements EventSubscriberInterface
|
||||||
|
|
||||||
def metadata_updated(m) =
|
def metadata_updated(m) =
|
||||||
def f() =
|
def f() =
|
||||||
if (m["title"] != !last_title or m["artist"] != !last_artist) then
|
if (m["is_error_file"] != "true") then
|
||||||
last_title := m["title"]
|
if (m["title"] != !last_title or m["artist"] != !last_artist) then
|
||||||
last_artist := m["artist"]
|
last_title := m["title"]
|
||||||
|
last_artist := m["artist"]
|
||||||
j = json()
|
|
||||||
|
j = json()
|
||||||
if (m["song_id"] != "") then
|
|
||||||
j.add("song_id", m["song_id"])
|
if (m["song_id"] != "") then
|
||||||
j.add("media_id", m["media_id"])
|
j.add("song_id", m["song_id"])
|
||||||
j.add("playlist_id", m["playlist_id"])
|
j.add("media_id", m["media_id"])
|
||||||
else
|
j.add("playlist_id", m["playlist_id"])
|
||||||
j.add("artist", m["artist"])
|
else
|
||||||
j.add("title", m["title"])
|
j.add("artist", m["artist"])
|
||||||
|
j.add("title", m["title"])
|
||||||
|
end
|
||||||
|
|
||||||
|
_ = azuracast_api_call(
|
||||||
|
"feedback",
|
||||||
|
json.stringify(j)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
_ = azuracast_api_call(
|
|
||||||
"feedback",
|
|
||||||
json.stringify(j)
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue