This script allows you to toggle the like status of the currently playing song on Spotify using the Spotipy library and winotify with requests for notifications.
- Python 3.x
- Spotipy, python-dotenv, winotify and requests packages
- Spotify account with an active session
- Spotify app registered in the Spotify Developer Dashboard
- Download the repository.
- Install Python 3.x from the official website.
- Set up your Spotify app in the Spotify Developer Dashboard.
- Set your redirect URI to
http://127.0.0.1:8888/callback. - Run the
install.batfile to install the required dependencies and set up the environment. - Follow the prompts to enter your Spotify credentials.
-
Download the repository.
-
Install Python 3.x from the official website.
-
Install all required packages in one command:
pip install spotipy python-dotenv winotify requests
-
Set up your Spotify app in the Spotify Developer Dashboard.
-
Set your redirect URI to
http://127.0.0.1:8888/callback. -
Create a
.envfile in the root directory of the project. -
Obtain your
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETand place them in .env file:SPOTIFY_CLIENT_ID=your_client_id SPOTIFY_CLIENT_SECRET=your_client_secret NOTIFICATIONS_ENABLED=your_notification_preference (true/false)
To like or remove from liked the currently playing song, run the corresponding batch file:
- To like the song, run
like.bat. - To remove the song from liked, run
dislike.bat.
If you use apps like Razer Synapse you may add the script to your macros to run it with a press of a key. To do this:
- Select a key.
- Go into Launch category and select path to the launch.bat file.
- Save the macro.