From 96bcaa9102e746186337b3e033c02e347ca1689f Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 19 Nov 2017 12:32:46 +0100 Subject: [PATCH] [mpd] Fix noidle command returning an error; fix format error in stats command --- src/mpd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mpd.c b/src/mpd.c index 63cd70ca..97109fa9 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -689,7 +689,8 @@ mpd_command_noidle(struct evbuffer *evbuf, int argc, char **argv, char **errmsg, * will then leave idle mode and print results immediately; might be * empty at this time." */ - return mpd_notify_idle_client(ctx, 0); + mpd_notify_idle_client(ctx, 0); + return 0; } /* @@ -815,7 +816,7 @@ mpd_command_stats(struct evbuffer *evbuf, int argc, char **argv, char **errmsg, int albums; time_t start_time; double uptime; - time_t db_update; + int64_t db_update; int ret; memset(&qp, 0, sizeof(struct query_params)); @@ -833,7 +834,7 @@ mpd_command_stats(struct evbuffer *evbuf, int argc, char **argv, char **errmsg, start_time = (time_t) db_admin_getint64(ADMIN_START_TIME); uptime = difftime(time(NULL), start_time); - db_update = (time_t) db_admin_getint64(ADMIN_DB_UPDATE); + db_update = db_admin_getint64(ADMIN_DB_UPDATE); //TODO [mpd] Implement missing stats attributes (playtime) evbuffer_add_printf(evbuf,