Spydio is a tool designed to manage Spotify playback based on the audio status of other applications, such as a web browser. If the browser's audio is paused or muted, Spydio will automatically resume playback on Spotify, eliminating the need to manually control it through the application. Likewise, when audio is resumed or sound is detected again in the browser, Spydio will automatically pause Spotify playback.
- Detects if the browser is playing audio.
- Pauses or resumes Spotify playback based on the browser's audio state.
- Allows monitor configuration and detection of clicks in specific areas.
- Compatible with multiple browsers and monitors.
- Python 3.12 or higher
- Python libraries:
spotipy
for interacting with the Spotify API.pynput
for detecting keyboard and mouse clicks.PyQt5
for monitor detection and handling.customtkinter
for the graphical user interface.
Note: The graphical interface for Spydio will not be available until January 2025. Therefore, all interactions with the program must be done through the console.
To get started, clone the repository to your local machine. You can do this by running the following command:
git clone https://github.com/mauuroo/Spydio.git
Navigate into the project directory:
cd Spydio
Install the required dependencies. You can do this using:
pip install -r requirements.txt
You must set up your Spotify credentials so that Spydio can interact with your account. Follow these steps:
-
Log in to your Spotify account:
- Go to the Spotify for Developers page and log in.
-
Access the Dashboard:
- Once logged in, click on "Dashboard" at the top of the page or go directly to the Spotify Developer Dashboard.
-
Create a New Application:
- In the dashboard, click on "Create an App".
- Fill in the required fields (name, description), set the "Redirect URI" to
http://localhost:8888/callback
, and agree to the terms. - Once the application is created, you will find your client_id and client_secret in the application's Settings.
-
Configure Spydio:
- Open the
spotify_config.py
file in the project. - Replace the placeholder values with your credentials:
CLIENT_ID='your_client_id' CLIENT_SECRET='your_client_secret'
- Open the
Before running the program, ensure you are inside the src
folder of the repository. If you are not in the src
folder, navigate to it using:
cd src
Then, execute:
python main.py
When running, the program will ask for certain information through the console before starting. Once set up, it will run in the background, pausing and resuming your Spotify playback based on browser activity.
This project is licensed under the MIT License. See the LICENSE file for details.