SpotifyControl icon indicating copy to clipboard operation
SpotifyControl copied to clipboard

Cannot search for track, artist, or album

Open ghost opened this issue 7 years ago • 4 comments

When I try to use these commands: spotify play track [song name] spotify play artist [artist name] spotify play album [album name]

It will just return

Searching albums for [album I entered]
No results found for [album I entered]

And similarly for track and artist searches.

I am using macOS High Sierra Version 10.13.2 What could the cause for this issue?

ghost avatar Jan 29 '18 23:01 ghost

Spotify has upgraded their search api to require authorization. You need to create a client-id & client-secret; toss it to their accounts API; it returns a token. You need to use this limited time token to then authorize your search (client credentials auth process). To work around it, you can make a local hack that uses python and https://github.com/plamere/spotipy to perform the authorization, get the token, & then feed it to spotifycontrol (thats what I've done for the time being at least).

sharma0611 avatar Feb 01 '18 01:02 sharma0611

@sharma0611 Do you have a repo for this?

zachgibson avatar May 21 '18 18:05 zachgibson

Yes. https://github.com/sharma0611/SpokenWord/tree/master/scripts has an updated spotify_ctrl script that uses a token created by another script in the same directory, spotify_auth.py. To run both, you need to add your credentials to a config.cfg file in the main repo. It's ugly but you can adapt it to your needs.

sharma0611 avatar May 23 '18 06:05 sharma0611

Nice, I’ll have to play around with that. Thanks for sharing. 🙌

zachgibson avatar May 23 '18 15:05 zachgibson