this post was submitted on 23 Jul 2023
98 points (100.0% liked)

Selfhosted

39980 readers
726 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

You may have seen my previous post over here, after I had just gotten everything setup initially.

I've now expanded this with an additional script, a github repo, and proper documentation.

Here's a cleaner explanation:

I've taken on the challenge of self-hosting more of the services I regularly depend on. The latest target is Spotify. This meant I needed a simple and convenient way to listen to my music from anywhere, get new music into my collection, and also still receive recommendations based on my interests and listening habits.

I now have what I think is the pretty ideal setup, here's what it includes:

  • A 24/7 radio station that plays my entire catalog (link here if you're interested). This is powered by Azuracast along with the scripts in the repo. The station link is using the Public Pages feature in Azuracast with a bunch of custom CSS.

  • A Spotify-like experience that also supports mobile and offline. This is powered by Navidrome for web/desktop and Substreamer for mobile. Substreamer connects to Navidrome using the Subsonic API.

  • A couple of scripts that allow me to easily download tracks/albums/playlists from Spotify and Youtube. I used these to bootstrap the collection and export my existing playlists from each service.

  • A couple of scripts that automatically grab my latest recommendations from Spotify and LastFM, add them into Navidrome, and provide me a nearly fully automated way to parse out tracks I want to keep permanently.

That last point is the most interesting part in my opinion. Both scripts run on a weekly cron job that downloads my Discover Weekly playlist from spotify, and current recommendations from LastFM. It then creates a playlist for each source for that weeks collection and moves it into Navidrome.

I then browse that weeks playlist at my leisure, using the "star" feature in Navidrome to decide what to keep. Once I'm done I run another script manually that takes all of the starred tracks from those two playlists and moves them into my catalog, and then deletes the remaining tracks and the playlists.

This means I just need to go through and listen to recommendations and click a button on what to keep, and the rest is discarded automatically. It really doesn't get any simpler than this!

What remains will then be available for on-demand playback through Navidrome and also added to the full catalog that powers the 24/7 radio station.

FAQs from the last thread

What is being used to download from X? - spotdl is being used for Spotify.pytube is being used for LastFM and Youtube. spotdl is also just downloading tracks from Youtube under the hood.

What is the audio quality of the downloaded tracks? - Since these are coming from Youtube, everything is a 128kbps VBR Opus codec. It's certainly not FLAC but it's good enough for my enjoyment.

top 6 comments
sorted by: hot top controversial new old
[–] lyoko@lemm.ee 8 points 1 year ago (1 children)

How do you keep your Spotify recommendations update ? Don't you have to listen to songs on it to get updated recommendations ?

[–] Zetaphor@zemmy.cc 3 points 1 year ago

They keep updating the list every week even if you're not listening. Also I've used their service for years so they have me pretty well figured out.

[–] roofuskit@kbin.social 3 points 1 year ago* (last edited 1 year ago) (1 children)

How are you scrobbling to last.fm? Is it from substreamer or is there a plugin for Navidrome?

You can automatically replace the tracks downloaded from YouTube using Lidarr and set it to upgrade monitored albums until they're FLAC.

[–] Zetaphor@zemmy.cc 1 points 1 year ago* (last edited 1 year ago)

Navidrome natively supports scrobbling. I also scrobble from Clementine on my desktop.

I'm downloading individual tracks much more than I'm downloading entire albums.

[–] spez_@lemmy.world 2 points 1 year ago (1 children)

Is the mobile client open source?

[–] Zetaphor@zemmy.cc 3 points 1 year ago

Unfortunately no, but any client that supports the subsonic api will work

load more comments
view more: next ›