Escape ha-now-playing output

This commit is contained in:
Erwin Boskma 2022-11-19 17:24:19 +01:00
parent 1815782f9a
commit 2301b7b7de
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU

View file

@ -11,7 +11,7 @@ with lib; let
ENABLED=" " ENABLED=" "
DISABLED=" " DISABLED=" "
if [[ ''${COUNT} != 0 ]]; then DISABLED=" ''${COUNT}"; fi if [[ ''${COUNT} != 0 ]]; then DISABLED=" ''${COUNT}"; fi
if ${pkgs.dunst}/bin/dunstctl is-paused | grep -q "false" ; then echo "''${ENABLED}"; else echo "''${DISABLED}"; fi if ${pkgs.dunst}/bin/dunstctl is-paused | grep -q "false" ; then ${pkgs.coreutils}/bin/echo "''${ENABLED}"; else ${pkgs.coreutils}/bin/echo "''${DISABLED}"; fi
''; '';
in in
{ {
@ -108,6 +108,7 @@ in
"custom/now_playing" = { "custom/now_playing" = {
exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token"; exec = "${pkgs.ha-now-playing}/bin/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token-file /run/secrets/ha_now_playing_token";
exec-on-event = false; exec-on-event = false;
escape = true;
format = " {}"; format = " {}";
restart-interval = 1; restart-interval = 1;
return-type = "json"; return-type = "json";