• 2 Posts
  • 24 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle









  • lyoko@lemm.eeOPtoSelfhosted@lemmy.worldAn Opensubsonic server in Rust
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    8 months ago

    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


  • lyoko@lemm.eeOPtoSelfhosted@lemmy.worldAn Opensubsonic server in Rust
    link
    fedilink
    English
    arrow-up
    14
    ·
    edit-2
    8 months ago

    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.











  • I actually need more than merging. For example, right now my traefik.template will look like this:

    [http.routers.{{ router_name }}]
      rule = "{{ router_rule }}"
      service = "{{ service_name }}"
      middlewares = [{{ middlewares | map("tojson") | join(", ") }}]
    {% block router %}{% endblock %}
      [http.routers.{{ router_name }}.tls]
        certResolver = "leresolver_http"
    
    {% if service_host is defined %}
    [[http.services.{{ service_name }}.loadBalancer.servers]]
      url = "{{ 'https' if service_use_https is defined else 'http' }}://{{ service_host }}{{ ':' ~ service_port if service_port is defined else '' }}"
    {% endif %}
    

    and then one of my traefik.toml could look like this

    {% extends "template/traefik.jinja" %}
    
    {% set router_name = "dozzle" %}
    {% set router_rule = "Host(`dozzle.example.com`)" %}
    {% set service_name = "dozzle" %}
    {% set service_host = "dozzle" %}
    {% set service_port = 8080 %}