/SpotifyVolumeController

Allows you to control Spotify volume with hotkeys

Primary LanguagePythonMIT LicenseMIT

SpotifyVolumeController

Setup

Create Spotify App.

  1. Go to Spotify Developer and login
  2. Create AppCreateApp
  3. Here is our Client Id and Client Secret which we will use later
  4. Click EDIT SETTINGS
  5. Add http://localhost:8080 as Redirect URLs
  6. Grab any dependancies with python -m pip install keyboard and python -m pip install spotipy
  7. Open VolumeController.py with a text editor, and populate SPOTIFY_USERNAME, SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET with the ID's from above.
  8. By default, Spotify volume up and down are bound to Page Up and Page Down. You can find the names of other keys to bind Spotify volume up and down here. NOTE: It appears that the options to rebind to are limited, so it could be easier to rebind your desired key (or rotary encoder) to the desired physical keys.
  9. Place VolumeController.py, VolumeController.bat, VolumeController.vbs in the same folder somewhere.
  10. Double-click VolumeController.bat, and a browser should open asking for authorization for your app to run.
  11. The script should now be running, and the opened terminal should just have >>> as the prompt (meaning you are in a Python instance).
  12. A .cache file should be automatically created in the same directory with the information needed to run the script
  13. If you want to have the python script automatically run at startup, make a shortcut of VolumeController.vbs and place it in the folder that appears when you hit Win + R and enter shell:startup.
  14. And you are ready to go :D