Closed moon-musick closed 6 years ago
That's prob. you didn't open the Spotify app. Could you try opening that and run the command again? One possible improvement to spotctl
is to make sure the Spotify app is open before running. But I'm not familiar with the location of Spotify app in Ubuntu. Any hints?
Hmm...according to the API doc:
When the device is temporarily unavailable the request will return a 202 ACCEPTED response code and the client should retry the request after 5 seconds, but no more than at most 5 retries.
I tried clicking the play button in the Spotify app and run the spotctl
command again and it works. May need a better way to fix this...
@moon-musick: https://github.com/jingweno/spotctl/pull/4 should address this. Please make sure your local Spotify app is opened. Thanks.
Forgot to mention, please make sure you have latest version of spotctl
which includes the fix: https://github.com/jingweno/spotctl/releases
I didn't have the app open indeed.
I downloaded the 1.0.1 release, but it seems it was not enough to have the app open to make it work. I got it to work by clicking the play button in the app first, just as you mentioned; after that spotctl
was able to pick up the status or show the player.
Thanks!
Hi,
I downloaded an amd64 linux release and am trying to set it up now. After a (supposedly) successful login (the browser says "Login successful, return to the terminal" etc.) any command intended to manipulate Spotify status (i.e. not
help
orversion
) yields2017/12/26 14:30:03 spotify: HTTP 202: Accepted (body empty)
message and immediately exits with exit status 1. The terminal session is a bit mangled afterwards and needs areset
to behave properly back again.It's likely I am doing something wrong; perhaps I omitted some setup step. Could it be so?
I use Ubuntu 16.04 amd64 if it's of any importance.