Greetings Tinkerers!
In the past couple of months I’ve been tinkering with some cool ways of modifying my homelab and writing k8s operators.
Alright so … as y’all know I am a huge music addict…
(cough!.)
… and my Spotify Premium membership just ended ( forgot to create a mandate … I guess a good thing? ), while looking to renew I was wondering why don’t I just self host something which can replace spotify for me.
I had couple of requirements for me to consider something as a spotify replacement-
- Scrobble things to last.fm
- Now playing on my discord through rpc
- Able to add/remove songs easily along with multi device syncing.
Previously, I used to have a single Smb server and used Mixplorer to pull songs to all my devices but … come on good UI is needed as well and Mixplorer isn’t really a music player lol.
Navidrome setup
On r/selfhosting, I’ve come across the very same thing I was looking for Navidrome.
Off I went into the Installation, Got the arm64 for my raspberry pi cluster and got it running on k8s, It was pretty straight forward deployments binded to my music local storage.
I’ll attach the repo of all the files and scripts later here
Gist
Navidrome UI
K8s
|
|
Now for Clients, I’ve decided to go with just the web application for my desktop since its pretty slick and lightweight to be run, While for android there are many cool ones but I am using Tempo@fdroid
Spotify <-> Navidrome migrations
Now for the important things … how do I bring my spotify songs into navidrome, I have over 1600+ Songs on spotify, Sadly spotify didnt have any google takeaway like feature, also Downloading songs is Piracy (duh) so we’re going off legal stuff here ;)
If Buying isnt owning, Pirating isnt stealing :D
To be honest Streaming is far better than buying songs induvidually for 23 INR like back on google play music days (2014s).
Spotdl
Anyhow, To download spotify songs I came across this amazing tool spotdl which queries youtube for the song name and downloads via ytdlp.
Wrote a simple script to fetch all my liked songs and make a long txt file containing urls. This was using spotipy.
Spotipy script to export
|
|
Now its just a matter of looping the big list and downloading via spotdl.
and viola populated the entire pv with some of my spotify songs.
|
|
Although it didn’t alot of niche songs I listen to (over 1000+) this really suffices me since all my recents are included in this!
Last.fm Integration
I use itspacchu@lastfm to keep track of my scrobbing data, Luckily lastfm is natively supported by navidrome
Popping in my client and secret and I got scrobbing working!! (The cool chart in beginning of this blog ^^)
Discord RPC Integration
Now for the final (not so) important thing, Discord Listening to.. Status messages, Spotify integration is strong with discord but navidrome doesn’t really have any native support for discord RPC.
I found this which claims to connect with navidrome server and send discord rpc status logixism/navicord.
It works!
Well now I shall be now binging songs through Navidrome, There are alot more things to do to make it as seamless as spotify,
Maybe have a discord bot to automatically download songs based on spotify link being provided to it, or
Another things is to rewrite the discord rpc in go for fun cause why not?
Anyhow hopefully I will see how long I can run this before my laziness kicks in :D
Bonus ramblings (Asahi Appreciation)
If you’re wondering why it says pacashi… I am now running Asahi Linux on my Mac :D
Daily driving this is really fun compared to Macos, Although its sometimes pain to run this due to limited 8G ram of my M1 air and lack of USB C Display out support (yet as of now).
If y’all haven’t heard of asahi linux project, Enjoy
Maybe I might write a post about it in future about my experiences with Asahi!
Cheers!