From a69e79e5ec3c86235e36579b843fd1177acea925 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sat, 26 Oct 2019 13:51:15 -0700 Subject: [PATCH] [daap] Make Apple Music on Catalina work - part 1 (fix for issue #834) Like with iTunes, it has adverse effects to announce support for DAAP groups, so with this change we also check if user-agent is "Music" before deciding what to announce. --- src/httpd_daap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/httpd_daap.c b/src/httpd_daap.c index 705a1eca..2ed41d61 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -821,11 +821,12 @@ daap_reply_server_info(struct httpd_request *hreq) dmap_add_short(content, "ated", 7); // daap.supportsextradata - /* Sub-optimal user-agent sniffing to solve the problem that iTunes 12.1 - * does not work if we announce support for groups. - */ + // Sub-optimal user-agent sniffing to solve the problem that iTunes 12.1 and + // Apple Music do not work if we announce support for groups if (hreq->user_agent && (strncmp(hreq->user_agent, "iTunes", strlen("iTunes")) == 0)) dmap_add_short(content, "asgr", 0); // daap.supportsgroups (1=artists, 2=albums, 3=both) + else if (hreq->user_agent && (strncmp(hreq->user_agent, "Music", strlen("Music")) == 0)) + dmap_add_short(content, "asgr", 0); // daap.supportsgroups (1=artists, 2=albums, 3=both) else dmap_add_short(content, "asgr", 3); // daap.supportsgroups (1=artists, 2=albums, 3=both)