Skip to content

About

I wanted to make a way to control my Spotify when I don't always have access to my phone for extended periods of time, without running Spotify in my web browser

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

spotify_controller

spotify_controller window
The Spotify controller

I wanted to make a way to control my Spotify when I don't always have access to my phone for extended periods of time, without running Spotify in my web browser

Overview

I explored HTTP requests and HTTP servers to access certain commands in the Spotify Web API. There was no use of the spotipy library.

Features

  • HTTPServer made in Python
  • Usage of HTTP requests
  • Can pause, play, skip, add to queue, and get the current song
  • Shows a window that:
    • Displays the current song title with the album cover that refreshes every 5 seconds
    • Displays the next 7 songs in the queue that refreshes every 5 seconds
    • Has button options explained in Usage

Technologies

  • Python
  • Spotify Web API

Installation

  1. Clone the repository and enter the folder:
git clone https://github.com/SETHCODES13/spotify_controller.git
cd spotify_controller
  1. Create and activate a virtual environment(optional but recommended):

Linux & macOS

python3 -m venv .venv
source .venv/bin/activate

Windows(Command Prompt)

python -m venv .venv
.venv\Scripts\activate
  1. Install the required Libraries:
pip install -r requirements.txt

Note: sudo apt install python3-tk on Debian or Ubuntu if Tkinter is missing

Setup

  1. Create an app on the Spotify Developer API
  2. Add the redirect URL http://127.0.0.1:8888/callback
  3. Paste your Client ID in the client_id line in heard_em_say.py

Usage

spotify_controller window
The standard look of the window

spotify_controller window
Adding something to the queue

When you run python3 heard_em_say.py, it shows the pop-up window shown above, which will be fully activated when a song is playing

Button Function
Add to Queue Adds the song entered in the textbox in the format (Song Name - Song Artist)
Pause/Play Pauses and plays the song based on whether it's paused or not.
Spotify API deactivates the player shortly after being paused, so resuming can fail
Next Song Plays the next song
Previous Song Plays the previous song

License

MIT License, see LICENSE

About

I wanted to make a way to control my Spotify when I don't always have access to my phone for extended periods of time, without running Spotify in my web browser

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages