Git Product home page Git Product logo

beatbind's Introduction

BeatBind - Spotify Global Hotkeys

build version python contributions welcome

Are you tired of constantly switching back and forth between your game and Spotify just to adjust the volume? With this app, you can finally control Spotify and adjust it's volume separately, all without the hassle of alt+tabbing. Say goodbye to interruptions and hello to effortless audio management!

This background Python Windows application utilizes the global_hotkeys module to listen for basic hotkeys, allowing users to easily control Spotify without the window focused. The app leverages the power of Spotify's Web API through the use of Spotipy, providing seamless integration between the app and the music streaming platform.



Buy Me A Coffee

Please see FAQ for more information or if you encounter any issues. If your issue isn't listed, please create an Issue ticket.

Table of Contents

Future Plans

Plans to refactor to C# soon! It will solve the following problems:

  • Modularity
  • Extensibility
  • Update friendly
  • No more false virus flags

Download

Download the latest version from the Releases page.

You can build the .exe yourself with the provided build command in the build.py file.

Requirements

  • Windows 10/11
  • Spotify Premium
  • Spotify on your device of choice

Instructions

The app requires the user to input four fields:

Client ID, Client Secret, and Port

  1. To obtain the Client ID and Client Secret, head to the following link Spotify for Developers.
  2. Sign-in and click on your profile in the top-right corner, then click on "Dashboard".
  3. Click on the "Create app" button to the right.
  4. Enter any "App name" and "App description" you want.
  5. In the app, populate the Port field with a port (e.g., 8888, 8000, 8080).
    • There's a possibility that the port you chose is being used on your network, if so, choose a different port.
  6. Back on the website, enter the following into "Redirect URI" with the port you chose (e.g., 8888):
    http://localhost:8888/callback
    
  7. Click on the checkbox and then "Save".

  8. Click on the "Settings" button to the top-right.
  9. Copy your Client ID and Client Secret (press "View client secret") and paste it into the app.

Device ID

  1. To obtain your Device ID, press the button "Get Devices" in the app once your Client ID and Client Secret are filled in.
  2. Click on the drop-down arrow and select your device of choice.
    • Note: if you don't see your device listed, open the Spotify app on that device and play something, then check again.

Once you're done, click on Save within the app to save your settings. Click on Start & Close to close the window and start listening for your hotkeys!

You can open the settings again by right-clicking on the app's system tray icon.

Troubleshooting

Please go through the below steps before creating an Issue ticket.

  1. If your app is not starting/opening, please see Why Is The App Not Starting?
  2. If your app is not starting on Windows startup, please see Why Isn't The App Starting on Startup? and Not launching on startup. #5
  3. Make sure your Client ID and Secret is correct and matches what is displayed in the Spotify developer site.
  4. Check if you have the Spotify desktop app installed, and make sure the Device ID selected is the correct one.
  5. Check if you're able to see the app within the system tray after pressing Start & Close.
  6. After confirming the above and it still doesn’t work, it is likely a port problem and you’re already using the selected port on your network. Choose a different port in the app, and also change the Redirect URI set in the Spotify developer site.

FAQ

Where Is My Information Saved?

  1. Press Win+R to bring up the "Run" menu, or type in "Run" within your Windows search bar.
  2. Enter the following in the "Open" input field:
    %appdata%
    
  3. Your information is stored locally within the .../AppData/Roaming/.beatbind folder. It stores your configuration settings and the token information required to interact with Spotify's Web API.

What Information Is Saved?

There are two files stored within the .../AppData/Roaming/.beatbind folder:

  • config.json, which contains your Client ID, Secret, Device ID, and your hotkey combinations.
  • .cache, which contains your token information to communicate with the Spotify app.

How Do I Update The App?

You can just replace your existing file(s) with the updated version. The config files are still saved within the .../AppData/Roaming/.beatbind folder, so your settings won't be lost.

Note: If your app keeps crashing after an update, you'll have to delete the .../AppData/Roaming/.beatbind folder and reinput your settings, or update your config.json file (Where Is My Information Saved?). Here is the current format your config should look like for v1.2.0+:

{"startup": true, "minimize": true, "client_id": "{your client id}", "client_secret": "{your client secret}", "port": "{your port e.g., 8888}", "device_id": "{your device id}", "hotkeys": {"play/pause": "control+alt+shift+p", "prev_track": "control+alt+shift+left", "next_track": "control+alt+shift+right", "volume_up": "control+alt+shift+up", "volume_down": "control+alt+shift+down", "mute": "control+alt+shift+space"}}

How Do I Disable Certain Hotkeys?

  1. Uncheck all of the Modifiers checkboxes.
  2. In the Key field, press "Backspace" or "Delete" on your keyboard to clear the field.

Why Isn't The App Starting on Startup?

This happens if the location of the app file was changed. The registry key used to start the app on Windows startup needs to be updated to the new .exe path. Starting the app again will update the path in the registry key and should resolve the issue.

Why Is The App Not Starting?

  • If you had "Start minimized" checked, you can find the app's icon hidden within your system tray and then right-click on it to find the settings menu.
  • Windows could be flagging it as a virus. Downloading the .zip folder instead or adding the .exe file to allowed files under Windows Security could fix your issue.
  • Check to see if you have the following folder, and then delete it: .../AppData/Roaming/.beatbind. Please see Where Is My Information Saved? to find the folder.

My Hotkeys Stop Registering After Waking From Sleep

There are rare cases where hotkeys stop registering on system wake up from sleep, and pressing Start & Close button again fixes the listener. For a more permanent fix, try disabling Windows Fast Startup. If the bug keeps occurring after disabling Fast Startup, please create an Issue ticket.

beatbind's People

Contributors

justinknguyen avatar

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.