all repos — site @ f66c2c121ae3edd04ec3b8ca9b960cd9f632d8aa

source for my site, found at icyphox.sh

Missed plaintext version
Anirudh Oppiliappan x@icyphox.sh
Sun, 13 Dec 2020 16:33:55 +0530
commit

f66c2c121ae3edd04ec3b8ca9b960cd9f632d8aa

parent

fc5cc56b1446882232405a61b3545939eb0fbd35

2 files changed, 95 insertions(+), 4 deletions(-)

jump to
M bin/plaintext.shbin/plaintext.sh

@@ -1,9 +1,6 @@

#!/bin/sh -# from the pure sh bible; see: -# https://github.com/dylanaraps/pure-sh-bible#get-the-base-name-of-a-file-path - -if ! command -v lynx &> /dev/null +if ! command -v lynx then printf '%s\n' "lynx not found, not going to run" exit
A pages/txt/music-streaming.txt

@@ -0,0 +1,94 @@

+ 13 December, 2020 + +My music streaming setup + +Think Spotify, but self-hosted and not as good + + Having a self-hosted, centralized music streaming setup has been on my + todo list for the longest time. I'd initially tried using NFS, but + mounting it on my phone was very inconvenient. Incidentally, a few days + ago, the existence of Subsonic/*sonic became known to me. + +gonic + + I found [1]gonic to be the simplest of them all, and proceeded to set + it up on the RPi. There are other alternatives too, like [2]Navidrome, + which ships with a web player, or [3]Airsonic. gonic stood out the most + to me because it's effectively headless, barring a simple web interface + for configuration. + + Setting it up was trivial. I did run into an [4]issue -- I noticed that + only songs that were already in folders, sorted by album, were being + picked up in the scan. +|-- Void Of Vision - Hyperdaze (2019) +| |-- 01. Overture.mp3 +| |-- 02. Year of the Rat.mp3 +| |-- 03. Babylon.mp3 +| |-- 04. If Only.mp3 +| |-- 05. Slave to the Name.mp3 +| |-- 06. Adrenaline.mp3 +| |-- 07. Hole In Me.mp3 +| |-- 08. Kerosene Dream.mp3 +| |-- 09. Decay.mp3 +| |-- 10. Splinter.mp3 +| |-- 11. Hyperdaze.mp3 +|-- Volumes - Disaster Vehicle.mp3 +|-- Volumes - Finite.mp3 +|-- Volumes - Heavy Silence.mp3 +|-- Volumes - Hope.mp3 +|-- Volumes - Interlude.mp3 +... + + + So, in a directory tree like above, only the tracks inside "Void Of + Vision - Hyperdaze (2019)" would get picked up, and all the "Volumes" + songs wouldn't -- since it wasn't in a subfolder of its own. + + As a workaround -- and a necessary cleanup of my music -- I figured I'd + give [5]beets a shot. + +beets + + beets is extensively documented, so I'll skip the basics. In essence, + it's a music organization tool -- fetches tags, sorts your collection, + etc. Most of my music has been tagged already, so I skipped that. I + only it all to be grouped by album. A bit of digging in the docs, and I + found what I wanted: --group-albums. + + And in my config.yaml, I specified my desired path format like so: +... +paths: + default: $albumartist - $album%aunique{}/$track $title + + Finally, running: +$ beet import --noautotag --move --group-albums path/to/dirty/music + +$ tree ~/music +... + +104 directories, 1108 files + + Nice! gonic then happily scanned all my music. + +actually streaming this music + + On my laptop, I decided to just use the NFS share approach -- primarily + because I'd like to stick to cmus and desktop Subsonic clients like + [6]Sublime Music are very clunky. + + On Android, there are quite a few options on F-Droid -- I decided to go + with [7]Ultrasonic since it's the only one that supports Last.fm + scrobbling. + + All things considered, I think I'm pretty satisfied with this. `twas a + good weekend. + +References + + 1. https://github.com/sentriz/gonic + 2. https://www.navidrome.org/ + 3. https://airsonic.github.io/ + 4. https://github.com/sentriz/gonic/issues/89 + 5. https://beets.io/ + 6. https://gitlab.com/sublime-music/sublime-music + 7. https://github.com/ultrasonic/ultrasonic