Skip to content

Commit

Permalink
Spotify Now Playing (via spotctl): ignore errors
Browse files Browse the repository at this point in the history
Sometimes spotctl gets a weird response from Spotify even though everything is fine, this can just be ignored
  • Loading branch information
dAnjou authored Jul 31, 2020
1 parent 6d31cc7 commit 3f99e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Music/spotctl.10s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case "$1" in
exit
esac

state=$(spotctl status | sed -n 1p | grep -o playing || echo paused)
state=$(spotctl status 2> /dev/null | sed -n 1p | grep -o playing || echo paused)

if [ "$state" = "playing" ]; then
status=$(spotctl status)
Expand Down

0 comments on commit 3f99e42

Please sign in to comment.