audio: fix librespot playback and use avahi for mDNS

Fix librespot playback by building the dev branch and applying the
changes from librespot PR 1528
(https://github.com/librespot-org/librespot/pull/1528) fixing librespot
issue 1527 (https://github.com/librespot-org/librespot/issues/1527).

Also make librespot use Avahi, since shairport-sync already uses that.
This commit is contained in:
June 2025-08-11 04:18:41 +02:00
commit df365e67f9
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
4 changed files with 251 additions and 4 deletions

View file

@ -19,11 +19,11 @@ in
enable = true;
description = "Spotify Connect Receiver Using librespot";
unitConfig = {
Requires = [ "network-online.target" "pipewire.service" ];
After = [ "network-online.target" "pipewire.service" ];
Requires = [ "network-online.target" "pipewire.service" "avahi-daemon.service" ];
After = [ "network-online.target" "pipewire.service" "avahi-daemon.service" ];
};
serviceConfig = {
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache";
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache --zeroconf-backend avahi";
User = "librespot";
Group = "librespot";
};