[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
This commit is contained in:
ejurgensen 2024-09-30 19:59:34 +02:00
parent b9fa790f50
commit 81cf713a83
1 changed files with 6 additions and 2 deletions

View File

@ -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 // No peer address if the function is called from httpd_daap.c when the DAAP
// cache is being updated // cache is being updated
if (!hreq->peer_address) if (!hreq->peer_address || !hreq->user_agent)
return XCODE_NONE; return XCODE_NONE;
// A Roku Soundbridge may also be RCP device/speaker for which the user may // 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); ret = player_speaker_get_byaddress(&spk, hreq->peer_address);
if (ret < 0) if (ret < 0)
return XCODE_NONE; return XCODE_NONE;