mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-01 01:53:23 -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))
|
if ((database == DAAP_DB_RADIO) && (plstreams == 0))
|
||||||
continue;
|
continue;
|
||||||
if ((database != DAAP_DB_RADIO) && (plstreams == plitems))
|
if ((database != DAAP_DB_RADIO) && (plstreams > 0) && (plstreams == plitems))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Don't add empty playlists */
|
/* Don't add empty Smart playlists */
|
||||||
if ((plid > 1) && (plitems == 0))
|
if ((plid > 1) && (plitems == 0) && (pltype == PL_SMART))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
npls++;
|
npls++;
|
||||||
@ -1723,8 +1723,7 @@ daap_reply_playlists(struct evhttp_request *req, struct evbuffer *evbuf, char **
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Item count (mimc) */
|
/* Item count (mimc) */
|
||||||
if (plitems > 0)
|
dmap_add_int(playlist, "mimc", plitems);
|
||||||
dmap_add_int(playlist, "mimc", plitems);
|
|
||||||
|
|
||||||
/* Container ID (mpco) */
|
/* Container ID (mpco) */
|
||||||
ret = safe_atoi32(dbpli.parent_id, &plparent);
|
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));
|
memset(&pli, 0, sizeof(struct playlist_info));
|
||||||
pli.title = "Spotify";
|
pli.title = "Spotify";
|
||||||
pli.path = "spotify:base_playlist";
|
pli.type = PL_PLAIN;
|
||||||
|
pli.path = "spotify:playlistfolder";
|
||||||
|
|
||||||
ret = db_pl_add(&pli, &g_base_plid);
|
ret = db_pl_add(&pli, &g_base_plid);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user