Giter Club home page Giter Club logo

spotify-liked-song-genres's Introduction

spotify-liked-song-genres

When I'm with my best friend, I wanna listen to EDM. When I'm alone, I wanna listen to rap. When I'm with my family, I wanna listen to pop.

This application retrieves the "Liked Songs" of a linked Spotify account once every day and then sorts them into predefined playlists with assigned genres.

Demo

Installation

Clone the repository, install the repository and copy the default configuration.

git clone https://github.com/bemoty/spotify-liked-song-genres && cd spotify-liked-song-genres && npm install && cp .config/default.json .config/production.json

Then, insert the credentials for your Spotify application created in the Spotify dev dashboard.

    "client_id": "...",
    "client_secret": "...",
    "redirect_uri": "...",

And finally, create genre-specific playlists in your Spotify client, copy the playlist ID from the playlist URL and configure the "playlists" section of the config however you want. Quick documentation:

Field Description
"id" the ID of the playlist which can be found in the playlist URL (get it with Right click -> Share -> Copy link to playlist)
"name" the name of the playlist; doesn't have to be the same as in the client. This field is pretty much only used in the console log right now
"genres" an array containing all genres which should be put into the playlist
"ngenres" an array containing all genres which should NOT under ANY CIRCUMSTANCES be put in the playlist (helpful if you want a rap playlist but don't want rap of a specific language to be in there)
"aoverride" an array containing artist names which should be put in the playlist. Some artist on Spotify do not have a genre rating yet so you can manually assign artists without a genre rating with this field

Run the application with npm run start (preferrably in a terminal emulator such as screen or tmux)

P.S.: Documentation for Docker coming soon (or so)

Commands

I also added some utility commands.

Command Description
reload runs the main job of the application (refetching liked songs, populating playlists)
check retrieves all liked songs and checks if there are any artists which can't be put in any playlists because their genres have no mapping
info [artistId] retrieves the genres of an artist (takes 1 argument: the artist ID)
genres retrieves the genres of all artists and exports them into a CSV file

By the way...

This was a quick afternoon project I made basically just for use by me. With that being said, I do not take any responsibility for anything this application does, such as your Spotify playlists getting messed up. Please only use this application if you know what you're doing.

Also, everything in here is always subject to change. I might as well just go ahead and rewrite the entire application one day without warning.

If you or anyone you know is actually using this and think it's helpful, I'd love to hear from you and your experience with my project on Twitter. :)

License

This project is licensed under the GNU General Public License v3.0.

spotify-liked-song-genres's People

Contributors

bemoty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

harryherbig

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.