Closed neurokrish closed 1 year ago
I'm coming back to this after trying a new client by Tolqir (Symfonium) and exploring its playlist capabilities. I think this would be a great feature that differentiates Navidrome.
I've played a bit with setting up MPD and using blissify to generate playlists and find them really great. I would love to see how Navidrome could leverage this, i.e.:
Are there other smart playlist ideas being explored for Navidrome? This blissify one seems like a slam dunk, just figuring out the infrastructure rather than the intelligence.
Integrating bliss-rs
into Navidrome is not straightforward, as bliss-rs
is written in Rust, and using it as a library in Navidrome in not feasible (AFAIK).
Another solution is to use it as an external program, but in this case, the user would need to provide bliss-rs
in their system. Then there's not much "integration" needed, as they could just run bliss-rs
periodically and generate playlists in Navidrome's music folder.
I didn't spend too much time looking into this, let me know if I am missing anything.
So I've spent some time doing preliminary research on that. While I probably won't be able to contribute much code (neither Go nor Rust are my strong suits) this might save someone some time later.
An optional side tool that either runs automatically on the entire library or is run by Navidrome as needed is clearly the way to go. However, there are some significant problems with doing that.
blissify
cannot be used as is, as it depends on MPD. But a side tool appears trivial to implement -- a simple Python script is sufficient, you don't even have to go Rust, because the library has Python bindings. The question is what exactly to do with the data that results. Analyzing a music file with bliss-rs produces an array of 20 32-bit floating point numbers, the meaning of which is rather opaque. From reading the Rust source, I can see that these are meant to be 10 2-dimensional vectors, presumably in x,y pairs, unless I'm misreading something. The stock algorithm that computes song "distance" uses euclidean distance by default.
The idea of bliss is that the results of song analysis are not human-meaningful. While it's obvious you might stuff them into a custom tag somewhere (While blissify keeps it in a separate database, it's a feature of a specific music file, so I think it belongs with the rest of metadata just like replaygain.) to make use of it in a flexible fashion, Navidrome would have to at least implement the distance calculation, never mind handle the extra custom tags (do the libraries used let you do that?) and extend the Subsonic API to allow clients to trigger playlist generation (or sorting) in some way.
Simply generating M3U playlists based on a given song without involving Navidrome at all is easy enough, and something I'll do just to figure out how good bliss-rs actually is at detecting song similarity, but that's hardly a smart playlist.
feature request
bliss-rs generates smart playlists by analyzing the music library (https://github.com/Polochon-street/bliss-rs). Integration into Navidrome would be great for dynamically generating playlists based on a seed song!