Use db_get_count() wherever applicable; simplify db_{pl,files}_get_count() prototypes

This commit is contained in:
Julien BLACHE
2009-06-11 18:41:50 +02:00
parent 2d1c35b855
commit c589d92b14
4 changed files with 14 additions and 142 deletions

View File

@@ -935,22 +935,10 @@ daap_reply_dblist(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
dmap_add_long(evbuf, "mper", 1); /* 16 */
dmap_add_string(evbuf, "minm", name); /* 8 + namelen */
ret = db_files_get_count(&count);
if (ret < 0)
{
DPRINTF(E_LOG, L_DAAP, "Could not get song count\n");
count = 0;
}
count = db_files_get_count();
dmap_add_int(evbuf, "mimc", count); /* 12 */
ret = db_pl_get_count(&count);
if (ret < 0)
{
DPRINTF(E_LOG, L_DAAP, "Could not get playlist count\n");
count = 0;
}
count = db_pl_get_count();
dmap_add_int(evbuf, "mctc", count); /* 12 */
evhttp_send_reply(req, HTTP_OK, "OK", evbuf);