No description
- Python 89.7%
- PowerShell 5.4%
- Batchfile 4.9%
| Images | ||
| Modules | ||
| .gitignore | ||
| __init__.py | ||
| LICENSE | ||
| old_requirements.txt | ||
| README.md | ||
| requirements.txt | ||
| spmls_template_python312.bat | ||
| spmls_template_python312.ps1 | ||
| spmls_template_python313.bat | ||
| spmls_template_python313.ps1 | ||
| spotify_playlist_multi-level_sorting.py | ||
Spotify Playlist Multi-Level Sorting
- Spotify Playlist Multi-Level Sorting.
Spotify Playlist Multi-Level Sorting | About This Repository
- This is my repository for my project of creating a way to perform multi-level sorting on Spotify playlists with Python via the Spotify web API and spotipy library.
Spotify Playlist Multi-Level Sorting | Table of Contents
- Spotify Playlist Multi-Level Sorting | Additional Information
- Spotify Playlist Multi-Level Sorting | Execution
- Spotify Playlist Multi-Level Sorting | Notes
Spotify Playlist Multi-Level Sorting | Additional Information
- This cannot sort playlists that contain local files.
- This will sort a Spotify playlist in the following multi-level order:
- artist
- release_date
- album
- disc_number
- track_number
Spotify Playlist Multi-Level Sorting | Execution
- Prior to running this on your playlist, make a copy of it and test this on the copy.
- This has been tested on the following playlist: Spotify Playlist Multi-Level Sorting
- Create a Spotify application in the Spotify Developer Dashboard.
- Steps for creating an application can be found here.
- Use
http://127.0.0.1:3000/for the Redirect URI.
- Clone the repository with
git clone https://gitlab.cybersanctuary.xyz/wolveraptor/spotify-playlist-multi-level-sorting.git - Navigate to the cloned repository via CLI.
- For Windows use
PowerShellorCommand Prompt. - For Linux and MacOS use
Terminal.
- For Windows use
- Create a virtual environment.
- For Windows
Command Promptusepython.exe -m venv spmls. - For Windows
PowerShellusepython.exe -m venv spmls. - For Linux and MacOS use
python3 -m venv spmls.- On Debian/Ubuntu systems, you may need to install the
python3-venvpackage.- Example:
sudo apt install python3-venv
- Example:
- On Debian/Ubuntu systems, you may need to install the
- For Windows
- Activate the virtual environment.
- For Windows
Command Promptusespmls\Scripts\activate.bat. - For Windows
PowerShelluse.\spmls\Scripts\Activate.ps1. - For Linux and MacOS use
source spmls/bin/activate.
- For Windows
- Install required dependencies.
- For Windows
Command Promptusepython.exe -m pip install -r requirements.txt. - For Windows
PowerShellusepython.exe -m pip install -r .\requirements.txt. - For Linux and MacOS use
python3 -m pip install -r requirements.txt.
- For Windows
- Execute
spotify_playlist_multi-level_sorting.pyand supply theClient IDfrom the Spotify Developer Dashboard and theClient Secretfrom the Spotify Developer Dashboard.- Client ID:

- Client Secret:

- For Windows
Command Promptusepython.exe spotify_playlist_multi-level_sorting.py 0123456789 9876543210. - For Windows
PowerShellusepython.exe .\spotify_playlist_multi-level_sorting.py 0123456789 9876543210. - For Linux and MacOS use
python3 spotify_playlist_multi-level_sorting.py 0123456789 9876543210.
- Follow the on-screen prompts.
- Deactivate the virtual environment.
- For Windows
Command Promptusespmls\Scripts\deactivate.bat. - For Windows
PowerShellusedeactivate. - For Linux and MacOS use
deactivate.
- For Windows
Spotify Playlist Multi-Level Sorting | Notes
- To view example usage and the optional argument execute:
- Windows:
py spotify_playlist_multi-level_sorting.py -horpy spotify_playlist_multi-level_sorting.py --help - MacOS and Ubuntu:
python3 spotify_playlist_multi-level_sorting.py -horpython3 spotify_playlist_multi-level_sorting.py --help
- Windows:
0123456789and9876543210are examples ofClient IDandClient Secretrespectively. Do not use these values as they will not work. You must enter theClient IDandClient Secretas they appear in the Spotify Developer Dashboard.- If the optional argument -ruri or --redirect_uri is supplied, the
Redirect URIfrom the Spotify Developer Dashboard must be entered as well. This optional argument only needs to be supplied if aRedirect URIother thanhttp://localhost:3000was configured in the Spotify Developer Dashboard.