Self hosted Spotify "Daily Drive" playlist creation and synchronization without the podcasts.
According to Spotify news article:
It’s a new Spotify playlist that combines the very best of news talk shows, including the relevancy and personality of the hosts, with the best of audio streaming (on demand, personalized playing and discovery). It combines music you love with relevant, timely world updates from reputable sources – all put together in a seamless and unified listening experience. - Your Daily Drive: Music and News That’ll Brighten Your Commute
I like a lot the idea of a playlist mixing different type of music I'm listening to. Spotify already creates several daily mixes but each of them is focused on a specific type of music (pop, rock, etc..). "Daily Drive" is the first daily playlist mixing different music types and I found it pretty relative to my music taste. The negative point is that the playlist is meant to look like a radio, music divided by news and talk shows, but I do only want the music.
This repository is a Go program meant to create a new playlist called "My Music Daily Drive" and sync it every day with the Spotify's "Daily Drive" playlist without the podcasts.
Spotify's "Daily Drive" playlist:
Created and synced playlist without the podcasts:
- First of all, you must have a Spotify account.
- Go to https://developer.spotify.com/dashboard/applications and login to your account.
- Create a new app by clicking on
CREATE AN APP
button. Give it the name and description you want. - Click on the
EDIT SETTINGS
button. Add a newredirect URI
: http://{your-server-ip}:2021/callback or http://localhost:2021/callback if you want to use it locally on you computer. - Click
SAVE
. - On the dashboard, keep the displayed
Client ID
andClient Secret
for later use.
- ssh to your server.
- Clone this repository:
git clone git@github.com:victorneuret/dailydrive.git
- Move to the cloned repository
cd dailydrive
- Create a
.env
file and add you client id, secret and redirect URL in it:
SPOTIFY_ID=YOUR_CLIENT_ID
SPOTIFY_SECRET=YOUR_CLIENT_SECRET
REDIRECT_URL=http://{your-server-ip}:2021/callback
- Build and launch the docker image
docker-compose up -d
- Connect your Spotify account in the launched app by clicking the link in the log
docker logs -f daily-drive
- Accept the connection on the web page
- The first sync should be executed and logged.
- You can hit CTRL + C to quit the logs.
Your new playlist should be created on your account:
The update of the playlist will be automatically executed every day at midnight on your server time.
Enjoy! 🎉