update np-subsonic script
it seems to return "" when it doesn't have any data (network down)
This commit is contained in:
parent
7e310649b7
commit
75afe05e7f
@ -23,7 +23,8 @@ local entry=$(jq '."subsonic-response".nowPlaying.entry[0]' <<<${response})
|
|||||||
local title=$(jq --raw-output .title <<< ${entry})
|
local title=$(jq --raw-output .title <<< ${entry})
|
||||||
local artist=$(jq --raw-output .artist <<< ${entry})
|
local artist=$(jq --raw-output .artist <<< ${entry})
|
||||||
|
|
||||||
if [[ "${title}" != "null" && "${artist}" != "null" ]]; then
|
if [[ "${title}" != "" && "${artist}" != "" ]] \
|
||||||
|
&& [[ "${title}" != "null" && "${artist}" != "null" ]]; then
|
||||||
print ${title} – ${artist}
|
print ${title} – ${artist}
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user