A go service that moves songs from user's Release Radar to a long term playlist (named Continuous Release Radar by default) on Spotify.
I have provided a cronjob script that automates the process and runs the script every week on Tuesday at noon.
-
Start by registering your application at the following page:
https://developer.spotify.com/my-applications/.
You'll get a client ID and secret key for your application.
-
Create a .env file and set
SPOTIFY_ID
to the client ID andSPOTIFY_SECRET
to the secret key. -
If you haven't installed Golang previously, go ahead and install it.
-
If you would like to name the the playlist something other than "Continuous Release Radar", edit the
PLAYLIST_NAME
in themove_tracks.go
file. -
Run
go run .
in the terminal in the project folder. -
The app will print a url. Go to that url and sign in and allow the permissions the app requests. The app will then create the playlist and copy over this week's Release Radar.
-
Edit the cronjob.sh file by setting the variables.
CRR_HOME
should be wherever you have this project located on your machine.GO_PATH
should be wherever Golang is installed on your machine. A common location forGO_PATH
is/usr/local/go/bin/go
. -
To prevent duplicates, if current time is between Tuesday at noon and Thursday night, continue to the steps below. If the current time is after Friday and before Tuesday at noon, then delete the Continuous Release Radar playlist from the Spotify client and continue with the steps below. Don't worry, it will get recreated on Tuesday at noon.
-
Run the cronjob.sh file.
-
That's it! As long as the computer is awake every Tuesday at noon, the tracks in that week's Release Radar will be copied over into the playlist.
The cronjob works on Linux and Mac. I don't know if Windows supports cron, I presume not though.
Feel free to throw any questions into the issues page. I'd be happy to help out.
PRs are also welcome.