hnarayanan / shpotify

A command-line interface to Spotify.
https://harishnarayanan.org/projects/
2.01k stars 153 forks source link

Can't query Spotify API - Schpotify crashes #108

Closed vjeeva closed 6 years ago

vjeeva commented 6 years ago

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').

vjeeva commented 6 years ago

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.

dmofot commented 6 years ago

@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
hnarayanan commented 6 years ago

@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.

dmofot commented 6 years ago

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

hnarayanan commented 6 years ago

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.