hnarayanan/shpotify

Can't query Spotify API - Schpotify crashes

vjeeva opened this issue · 5 comments

I was trying to run spotify play <song> but the script would crash my terminal, with the following output:

Connecting to Spotify's API
Autorization failed, please check

From looking at the script, looks like at https://github.com/hnarayanan/shpotify/blob/master/spotify#L176 there is a typo for the USER_CONFIG_FILE (config is missing an 'i').

Nevermind, this does not fix the issue. The problem seems to be https://github.com/hnarayanan/shpotify/blob/master/spotify#L162. Running this command manually (the printf) yields an empty string on OSX, seems that the tr -d "\n" is just returning an empty string.

@vjeeva the issue has already been fixed by pull #105 in the master branch. The fix will show up in homebrew once there is a new release from @hnarayanan

In the meantime, you can always install with $ brew install shpotify --HEAD to test the latest commits in the repo. Running --HEAD will play a song.

$ spotify play frontier psychiatrist
Connecting to Spotify's API
Searching tracks for: frontier psychiatrist
play uri: spotify:track:0E2UdlzNQP9I70MYumYlFo
Playing (frontier psychiatrist Search) -> Spotify URI: spotify:track:0E2UdlzNQP9I70MYumYlFo

@dmofot: Would you like to get write access on this repository, so that you can help make this release?

I have a new baby in the house which is making spending time on this project really hard.

Congrats @hnarayanan ! Whole world changes, ha. Happy to get write access for pushing releases.

Invited! Closing this issue, but any of the other regulars, if you want access to the repo to maintain, please ask and I will consider it.