Key Features • How To Use • Download • Dev Portal Instructions • Credits • License
- Customizable
- Able to change the chatbox text formatting very easy! Just change the formatting on
Song1[0] = f"Now playing {cur_song} by {cur_artist} {time2}/{time1}"
(time display/OSC always mode)
orSong1[0] = f"Now playing {cur_song} by {cur_artist}"
(send once per song mode).
- Able to change the chatbox text formatting very easy! Just change the formatting on
- Uses API
- Slightly more optimized than reading the Spotify program name, or limiting to Windows only via usage of the godawful Windows Now Playing API, plus with the added song scrobble time feature returned by SpotifyAPI.
- Able to display the current song playing on any device due to using API to retrieve playing information.
- Cross platform
- Windows, macOS and Linux ready.
- Timestamp and song length display. (updated aprox every 5 seconds)
- Or alternatively only send playing song once per each song, checked for song change on a 2 second interval.
Note : Usage of the Spotify API requires a premium account; this will not work with free accounts.
To clone and run this application, you'll need Python and git (links for windows) From your command line:
# Clone this repository
$ git clone https://github.com/Mezque/VRC-SpotifyOSC-Py
# Go into the repository
$ cd VRC-SpotifyOSC-Py/Py/Spotify
# Install dependencies
$ pip install -r requirements.txt
# Run the app
$ py Spotify.py
Open Spotify.py and set client_id
and client_secret
to their respected value on your created application from the Spotify Dev Portal. Instructions here
Note If you're using Windows, there is included bat files to do step 3 and 4.
(if you choose to download below you don't need to clone the repositroy or install git)
If Python is failing to run properly on Windows install it from the Microsoft Store instead of the python website for an easy fix; this is a Windows problem to do with how python is set up under your system variables.
You can download the latest version as well if you don't want to use git to clone the repository. It's the same thing just slower for people less experienced with usage of git through a CLI.
How to set up the application,
- Head to the Spotify Dev Portal and log into your account.
- Press the green button on the top of the right side that says "Create an app", the name doesn't matter and a description is not required.
- Open up the newly created app and copy your Client ID and set this value in the
Spotify.py
file. Do the same thing for the Client Secret after pressing Show Client Secret. - Press the green button around the same location where the create app button was on the previous menu and under the section "Redirect URIs" put
http://localhost:8888/spotify/callback
This software uses the following open source packages:
MIT