np-subsonic: return 1 if nothing is playing
This commit is contained in:
parent
ac83b7da1e
commit
53b6532e5d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user