From df86df02dc9ba2f113704e4b180a6242991993f6 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 30 Sep 2024 19:59:34 +0200 Subject: [PATCH] [daap] Fix for Apple Music/iTunes not working on Airplay host (attempt 2) OwnTone selects ALAC for daap streaming because it thinks the client is an Airplay speaker. Regression in 28.10 coming from PR #1698. Fixes #1816 --- src/httpd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/httpd.c b/src/httpd.c index 96724948..e61ec4d2 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -1237,11 +1237,15 @@ httpd_xcode_profile_get(struct httpd_request *hreq) // No peer address if the function is called from httpd_daap.c when the DAAP // cache is being updated - if (!hreq->peer_address) + if (!hreq->peer_address || !hreq->user_agent) return XCODE_NONE; // A Roku Soundbridge may also be RCP device/speaker for which the user may - // have set a prefered streaming format + // have set a prefered streaming format, but in all other cases we don't use + // speaker configuration (so caller will let transcode_needed decide) + if (strncmp(hreq->user_agent, "Roku", strlen("Roku")) != 0) + return XCODE_NONE; + ret = player_speaker_get_byaddress(&spk, hreq->peer_address); if (ret < 0) return XCODE_NONE;