🦀
spotify-np
spotify-np
is a Rust-based local webserver inspired by l3lackShark's gosumemory application, but the catch is that it's for Spotify!
This application utilizes the Crate spotify-info by Ricky12Awesome to read Spotify's data and turn it into a websocket. This, however, leads to a total of 3 servers being created:
- spotify-np's Local Server
- spotify-np's websocket
- spotify-info's websocket
It's an unfortunate case, but two are obligatory and one of them was the simplest option out of the rest.
What will I be downloading?
Fear not, young padawan. It's the little box in the bottom-left corner!spotify-np-demo.mp4
Usage
- As this is program is dependent on Cargo's
spotify_info
crate, head to this repository and follow the instructions to satisfy the Spotify end of the program. - Download the application here. Make sure to choose the right .zip for your computer:
- x86_64-pc-windows-msvc: Windows OS (x64)
- x86_64-unknown-linux-gnu: Unix-based OSs (x64)
- xaarch64-unknown--linux-gnu: Unix-based OSs (ARM64; i.e. Rasp. Pi)
- x86_64-apple-darwin: MacOS (x64)
- Extract the files to any place you find convenient.
- Just make sure the application has permission to exist and all that goodness.
- Navigate into the freshly-extracted folder and run the executable.
- Go to the hosted page! By default this should be
localhost:1273
with the websocket being hosted onlocalhost:1274
.
- Go to the hosted page! By default this should be
- Open Spotify and get to JAMMING!
🎶
For OBS users...
- Follow all of the previous steps.
- Add a browser source in OBS. Themes and resolutions are found in the themes repository.
- Set the browser source URL to
localhost:1273
- or whatever alternative you've set it to.
- DO. NOT. AND I REPEAT. DO NOT tick the following fields:
- Shutdown source when not visible
- Refresh browser when scene becomes active
- Why?
- It's because of a limitation in
spotify_info
. Initially, the website is uninitialized (it should be, depends on your theme) becausespotify_info
- and subsequently my application - does not send an initial message to indicate what track is being played. Therefore, if you allow OBS to shutdown or refresh the source and by extension refreshing the page, anytime OBS deems that it should do its tomfoolery to the browser source would cause the entire thing to refresh to its original state - and that's not good for user experience.
- It's because of a limitation in
- And you're done! Get streaming, have fun and don't stream too much copyrighted music!
Like what I do?
- Hey! Have you ever listened to Kill Bill: The Rapper's sleeptalking? Give it a whirl!
- I originally made this application because I wanted to stream development of my upcoming (or maybe present, depends on when you're reading) manga reader `suwariyomi.rs`, and I wanted to give credit to artists like `your best friend jippy` whilst keeping everything sleek. I also wanted to learn Rust.
🦀 - Did you know that I pledged to not listen to music (within sanity, like testing) until I got this project done? It was hard!