Spotify automation program with multiple functions.
- Takes local mp3 files and adds them to spotify playlist by searching the artist and title. If it is not found, it will add the information into a text file for the user to add manually to their playlist. Also shows the information of songs that were added into the playlist into another text file.
- Backup your playlist on Spotify into a text file with information of the artist, title of the song, and album. The text file produced will be located in the
outputfolder.
- Node.js
- Download as a zip and extract anywhere.
- Run
npm installin the root folder.
- Go to Spotify for Developers and create an app for this program.
- In the settings for the app add
http://localhost:8000/callbackas the redirect - Run
npm startin the root folder ornode server.jsin the javascript folder. - In your browser go to
localhost:8000 - Click on
Loginbutton. - Fill in the appropriate input. See more information here.
- Check the terminal to see if things are going smoothly.
- Client ID = Found in Spotify for Developers inside the app dashboard.
- Client Secret = Found in Spotify for Developers inside the app dashboard. Requires you to click show client secret.
- Playlist ID = Found in Spotify Web Player. When you enter a playlist it shows in the URL after
playlist/and before?.
For examplehttps://open.spotify.com/playlist/4hsReDJBeNEXQQj6U2dXsK?si=b18737fd10b94e26&nd=1has the ID4hsReDJBeNEXQQj6U2dXsK. - Song Location = See here.
The song location can accept either the full path of the location or look based from the location of the javascript folder.
home/
├── spotify-playlist-maker/
│ ├── javascript/
│ │ ├──function.js
│ │ └──server.js
│ ├── output/
│ ├── public/
│ └── secret/
└── song/
├── song1.mp3
└── song2.mp3
In the example above you can either put in home/song/or ../../song/as the song file location.