Skip to content

Commit

Permalink
[daap] Fix for Apple Music/iTunes not working on Airplay host (attemp…
Browse files Browse the repository at this point in the history
…t 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
  • Loading branch information
ejurgensen committed Sep 30, 2024
1 parent b9fa790 commit 81cf713
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81cf713

Please sign in to comment.