Send mpco in daap playlist reply, even when 0 (like iTunes)

This commit is contained in:
ejurgensen 2015-03-29 23:34:36 +02:00
parent a529d78880
commit 892fd9c402
2 changed files with 6 additions and 6 deletions

View File

@ -1674,11 +1674,11 @@ daap_reply_playlists(struct evhttp_request *req, struct evbuffer *evbuf, char **
*/
if ((database == DAAP_DB_RADIO) && (plstreams == 0))
continue;
if ((database != DAAP_DB_RADIO) && (plstreams == plitems))
if ((database != DAAP_DB_RADIO) && (plstreams > 0) && (plstreams == plitems))
continue;
/* Don't add empty playlists */
if ((plid > 1) && (plitems == 0))
/* Don't add empty Smart playlists */
if ((plid > 1) && (plitems == 0) && (pltype == PL_SMART))
continue;
npls++;
@ -1723,7 +1723,6 @@ daap_reply_playlists(struct evhttp_request *req, struct evbuffer *evbuf, char **
}
/* Item count (mimc) */
if (plitems > 0)
dmap_add_int(playlist, "mimc", plitems);
/* Container ID (mpco) */

View File

@ -1266,7 +1266,8 @@ logged_in(sp_session *sess, sp_error error)
memset(&pli, 0, sizeof(struct playlist_info));
pli.title = "Spotify";
pli.path = "spotify:base_playlist";
pli.type = PL_PLAIN;
pli.path = "spotify:playlistfolder";
ret = db_pl_add(&pli, &g_base_plid);
if (ret < 0)