Skip to content

A lightweight and optimized solution for Spotify Genre Sorter using the Yoda API.

License

Notifications You must be signed in to change notification settings

YodaBotOS/spotify-genre-sorter-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Genre Sorter Lite

A lightweight and optimized solution for @YodaBotOS/spotify-genre-sorter using the Yoda API

This repo uses Python with the Spotify API and OAuth2 to generate a playlist of songs based on the genre and creates a new playlist for that specific genre.

This repo is the same as @YodaBotOS/spotify-genre-sorter but with the following conditions:

  • Not locally hosted (AI Genre Classifier uses the Yoda API)
  • Much more lightweight (optimized by removing more unnecessary code/files and dependencies/requirements)
  • Might be a little slower (but optimized to be a little quicker. To make it faster, you can change the mode to fast instead of best in your config file but it might return false results and sometimes might not work)

⚠️ WARNING ⚠️

This project is still a Work In Progress, which means there will be a lot of bugs and unexpected things.

Feel free to experiment with this repo and report any issues you find.

PRs are always welcomed.

Credits:

This is taken from GitHub (@cetinsamet/music-genre-classification)

All credits go to him for making this amazing repo possible.

A live demo:

A live demo of this project is available here. The original version of that playlist is proguy's playlist.

Setup:

The below steps assumed you already have fulfilled the following requirements:

  • You have installed Python3.10 or above with pip in your computer.
  • You have Git installed in your computer. (Most OS comes with git built in, especially Linux distros)
  • A Spotify API Client ID and Secret
  1. Clone this repository (it might take some time depending on your internet speed).
git clone https://github.com/YodaBotOS/spotify-genre-sorter-lite
  1. Install the required dependencies (Note. It is recommended to use a venv instead).
pip install -U -r requirements.txt
  1. Copy config.example.py to the root folder of the repository, named config.py.
  2. Insert all the values for the essential variables. This includes:
    • SPOTIFY_PLAYLIST_ID
    • SPOTIFY_CLIENT_ID
    • SPOTIFY_CLIENT_SECRET
  3. Run the script.
python3 main.py
  1. Follow the instructions in your terminal.

About

A lightweight and optimized solution for Spotify Genre Sorter using the Yoda API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages