Skip to content

A webserver and websocket pair to stop your viewers from spamming !np and "what's the song?" all the time.

License

Notifications You must be signed in to change notification settings

Nowaaru/spotify-np

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-np 🦀

Windows Build Status MacOS Build Status Linux Build Status

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

  1. 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.
  2. 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)
  3. Extract the files to any place you find convenient.
    • Just make sure the application has permission to exist and all that goodness.
  4. 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 on localhost:1274.
  5. Open Spotify and get to JAMMING! 🎶

For OBS users...

  1. Follow all of the previous steps.
  2. Add a browser source in OBS. Themes and resolutions are found in the themes repository.
  3. 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) because spotify_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.
  1. And you're done! Get streaming, have fun and don't stream too much copyrighted music!

Like what I do?

bmc-button
  • 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!

About

A webserver and websocket pair to stop your viewers from spamming !np and "what's the song?" all the time.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages