mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #1347] [MERGED] Discovery: Refactor and add Avahi DBus backend #1349
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1349
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/librespot-org/librespot/pull/1347
Author: @wisp3rwind
Created: 9/23/2024
Status: ✅ Merged
Merged: 10/26/2024
Merged by: @roderickvd
Base:
dev← Head:avahi-dbus-v2📝 Commits (10+)
903843fdiscovery: use opaque error type for DnsSdError09a6171discovery: map all MDNS/DNS-SD errors to DiscoveryError::DnsSdError62e14e5discovery: de-duplicate zerconf data into module consts9e6c615discovery: use an opaque type for the handle to the DNS-SD service5383be1discovery: move service registration into separate functions283a501discovery: make features additivec8744a5discovery: add --zeroconf-backend CLI flag512c558discovery: Add minimal Avahi zeroconf backendc9f0aebbump MSRV to 1.75582537aupdate Cargo.lock and docs📊 Changes
15 files changed (+1156 additions, -129 deletions)
View changed files
📝
.devcontainer/Dockerfile(+1 -1)📝
.github/workflows/test.yml(+3 -3)📝
CHANGELOG.md(+5 -0)📝
COMPILING.md(+11 -0)📝
Cargo.lock(+432 -12)📝
Cargo.toml(+7 -4)📝
contrib/Dockerfile(+1 -1)📝
core/Cargo.toml(+0 -4)📝
core/src/error.rs(+0 -10)📝
discovery/Cargo.toml(+9 -2)➕
discovery/src/avahi.rs(+151 -0)📝
discovery/src/lib.rs(+395 -42)📝
discovery/src/server.rs(+36 -30)📝
oauth/Cargo.toml(+1 -1)📝
src/main.rs(+104 -19)📄 Description
So... I was mildly annoyed by the
warnings from the
dns_sdcompat library and thought it would be a fun little project to write an additional MDNS/DNS-SD backend that directly talks to Avahi via DBus.This PR is a minimal working example of that. I made quite some refactorings to the discovery module in order to keep the code readable and not litter it too much with
#[cfg(feature = "with-xyz")]guards. This should be fairly easy to review by looking at the individual commits and their messages.I have a local branch with some more error handling in the
avahi_task, but I'd be happy about your opinion on this before making things more complicated (I'd also need to clean that up a bit).Does this have a place in librespot upstream? If so, I'd add some more documentation around the new feature flags and commandline flag.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.