1
0
Fork 0

np-subsonic: return 1 if nothing is playing

This commit is contained in:
tastytea 2024-04-04 13:27:23 +02:00
parent ac83b7da1e
commit 53b6532e5d
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 5 additions and 1 deletions

View File

@ -23,4 +23,8 @@ local entry=$(jq '."subsonic-response".nowPlaying.entry[0]' <<<${response})
local title=$(jq --raw-output .title <<< ${entry})
local artist=$(jq --raw-output .artist <<< ${entry})
print ${title} ${artist}
if [[ "${title}" != "null" && "${artist}" != "null" ]]; then
print ${title} ${artist}
else
return 1
fi