From e79beb6877622cd30fb9f5fe5af7eae39b34e5ed Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 11 Mar 2018 22:40:07 +0100 Subject: [PATCH] [httpd_daap] Workaround for Android "Remote for iTunes" requesting playlist 0 See issue #505 --- src/httpd_daap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/httpd_daap.c b/src/httpd_daap.c index 11644863..d9c7f6f9 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -1373,6 +1373,15 @@ daap_reply_plsonglist(struct httpd_request *hreq) return DAAP_REPLY_ERROR; } + // This is a work-around for Remote for iTunes that for unknown reasons + // sometimes requests playlist 0 + if (playlist == 0) + { + DPRINTF(E_LOG, L_DAAP, "Client '%s' made invalid request for playlist 0, returning playlist 1\n", hreq->user_agent); + + playlist = 1; + } + return daap_reply_songlist_generic(hreq, playlist); }