mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 16:15:57 -05:00
Send mpco in daap playlist reply, even when 0 (like iTunes)
This commit is contained in:
parent
a529d78880
commit
892fd9c402
@ -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,8 +1723,7 @@ daap_reply_playlists(struct evhttp_request *req, struct evbuffer *evbuf, char **
|
||||
}
|
||||
|
||||
/* Item count (mimc) */
|
||||
if (plitems > 0)
|
||||
dmap_add_int(playlist, "mimc", plitems);
|
||||
dmap_add_int(playlist, "mimc", plitems);
|
||||
|
||||
/* Container ID (mpco) */
|
||||
ret = safe_atoi32(dbpli.parent_id, &plparent);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user