Spotify-Headless icon indicating copy to clipboard operation
Spotify-Headless copied to clipboard

node play.js not doing anything

Open amadeusdotpng opened this issue 3 years ago • 1 comments

I'm not sure if I'm doing this correctly, but I've done the following commands with my credentials so far:

export SPOTIFY_USER=""
export SPOTIFY_PWD=""
node token.js
cd lib

then I ran node play.js Two Slow Dancers and it doesn't really do anything. I'm not sure what else I'm supposed to do. What is the ACCESS_TOKEN that node token.js outputs used for?

amadeusdotpng avatar Nov 15 '21 08:11 amadeusdotpng

Hi. Due to the nature of the script, it can only read a properly formatted string (allowing multiple inputs and a server validation) So you need to pipe the search.js command into the play.js:

node search.js Two Slow Dancers | node play.js
## Play the first match only:
## node search.js Two Slow Dancers | head -n1 | node play.js 

If you're looking for a simpler alternative you can use my other shell script that takes a different approach.

BelkaDev avatar Nov 15 '21 11:11 BelkaDev