An Opensubsonic server in Rust (github.com)
from lyoko@lemm.ee to selfhosted@lemmy.world on 16 Apr 2024 12:13
https://lemm.ee/post/29579415

I am selfhosting Navidrome for sometimes but its lacks of support for multiple values really bugs me. Since I am having some free time, I’ve decided to write an opensubsonic server in rust (why rust? you guess). The notable features are:

It is still actively developped and lacks some Opensubsonic features (playlist/starr) and some external integrations like lastfm. However I would like to post it get some feedback about it.

Thank you very much!

#selfhosted

threaded - newest

barbara@lemmy.ml on 16 Apr 2024 12:20 next collapse

If I were to talk about it, how do you pronounce vnghia’s nghe-musl ?

zingo@lemmy.ca on 16 Apr 2024 12:41 next collapse

Hahaha WTF.

lyoko@lemm.ee on 16 Apr 2024 13:09 collapse

Never thought about it. Is there an inside joke am i missing @@

barbara@lemmy.ml on 16 Apr 2024 13:21 collapse

No joke. How do you pronounciate it?

[deleted] on 16 Apr 2024 14:14 collapse

.

lyoko@lemm.ee on 16 Apr 2024 14:53 next collapse

I see. Indeen I gave up teaching people pronounce my name correctly long time ago and told them just to call me by my family name so you coulld pronounce whatever you like. If you know a Vietnamese guy around just ask them to teach you and give them a headache

sabreW4K3@lazysoci.al on 16 Apr 2024 16:31 next collapse

Ni-Gee-Ah Knee?

barbara@lemmy.ml on 18 Apr 2024 05:35 collapse

I’m sad that you didn’t take me serious. I looked into the repo got interested and started with the first obvious question. I couldn’t have known that that’s your name. And even now, I still don’t know how to pronounciate it.

lyoko@lemm.ee on 18 Apr 2024 08:48 collapse

Sorry to make you feel that way. You are the first commenter and the first star on github so I am really appreciate it. “Nghe” could be decompose into two parts: “ngh” and “e”. The “e” part sound like “eh” but the “ngh” part is just “difficulty level: asian” so I put a video here: www.youtube.com/watch?v=ttA8ukm8lwI (“ngh” and “ng” have the same pronounciation). Thank you very much!

PipedLinkBot@feddit.rocks on 18 Apr 2024 08:49 next collapse

Here is an alternative Piped link(s):

https://www.piped.video/watch?v=ttA8ukm8lwI

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I’m open-source; check me out at GitHub.

barbara@lemmy.ml on 18 Apr 2024 13:49 collapse

All good, thx

chagall@lemmy.world on 17 Apr 2024 05:39 collapse

Mildly racist

sabreW4K3@lazysoci.al on 16 Apr 2024 16:34 next collapse

Couple questions,

Is Rust that much better than Go?

Would it have been impossible to submit your changes to Navidrome as pull requests?

Does this import the Navidrome database?

lyoko@lemm.ee on 16 Apr 2024 17:06 collapse

Is Rust that much better than Go?

IMHO, rust and go are two differents things. The reason I choose Rust is because it is fast and calling C code from rust is supported really well since Rust’s goal is to become a system language. Navidrome is just calling the ffmpeg binary. While in my project, I’ve compiled the neccessary parts of ffmpeg myself (thanks to vcpkg) and call the function directly from Rust. It leads to smaller and fully static final binary (because no ffmpeg bin) as well as faster transcoding time since we don’t have to wait for the ffmpeg binary to finish transcoding the whole file before load the result from the filesystem to the memory.

Would it have been impossible to submit your changes to Navidrome as pull requests?

You can see here. This is the biggest reason why I’ve decided to start my own implementation. Beside, I share my server with several friends so I want a mechanism to prevent mixing musics from different people.

Does this import the Navidrome database?

This could be a feature request in the future. I could add a python script to import users/songs/playlists/playcount/etc from Navidrome.

sabreW4K3@lazysoci.al on 16 Apr 2024 18:27 collapse

Thank you for taking the time to answer. I actually am subscribed to that thread and the upcoming new scanner that fixes that problem. Though now with your new server, you wouldn’t need to worry about that.

I truly wish you luck though. The more awesome subsonic servers around, the better. I hope your project can be just as much of a household name as Navidrome.

lyoko@lemm.ee on 16 Apr 2024 18:34 collapse

Thank you very much for your kind word! I’ve seen that scanner already but decided to reimplement anyway because I want to choose a different design from the start and have the flexibility to add some new features myself (some kind of ML integration like immich and S3 integration). At worse case, I will still use this so no problems :D

boerbiet@feddit.nl on 16 Apr 2024 20:46 next collapse

This sounds like a cool thing. Will it run on FreeBSD? If unknown, I will likely try and find out this weekend.

lyoko@lemm.ee on 17 Apr 2024 07:17 next collapse

I am trying adding a FreeBSD CI. Will let you know later if it is working or not

lyoko@lemm.ee on 17 Apr 2024 17:51 collapse

Here you go. But setting up a testing environment on github actions is too hard so it is built only for now.

Edit: test is added now

boerbiet@feddit.nl on 17 Apr 2024 19:46 collapse

Now that’s awfully cool of you 😄. I’ll give that a spin with Symfonium this weekend; much obliged!

lyoko@lemm.ee on 17 Apr 2024 19:49 collapse

Thank you! I just want to make my server as much cross-platform as possible :D

ReedReads@lemmy.zip on 16 Apr 2024 23:42 next collapse

This is really cool.

One thing that I find really helpful is when authors put a sample docker-compose.yml in their repository and link to it from the readme.md. Helps with the initial lift of getting started.

lyoko@lemm.ee on 17 Apr 2024 07:16 collapse

Thank you! Please give it a try and give me some feedbacks XD

beeng@discuss.tchncs.de on 17 Apr 2024 05:21 collapse

Hey what do you mean by multiple values?

Eg

since they support multiple values well enough.

lyoko@lemm.ee on 17 Apr 2024 07:20 collapse

In the opensubsonic response there will be two fields for artist, one is artistid with only one artist (this is for compatible with old subsonic) and the other is artists with a list of artist ids. The server only sends back the list of artists ids and only these two clients read that field.

beeng@discuss.tchncs.de on 17 Apr 2024 08:15 collapse

Thanks. And so this is good for tracks with multiple artists? For filtering?

lyoko@lemm.ee on 17 Apr 2024 08:46 collapse

Not sure what do you mean by filtering but this is my Symfonium UI

<img alt="" src="https://lemm.ee/pictrs/image/8035e080-973c-4b00-81a9-1e1406d05db1.webp">