diff --git a/src/db.c b/src/db.c index 444b9560..0fa0aa01 100644 --- a/src/db.c +++ b/src/db.c @@ -1677,7 +1677,7 @@ db_query_fetch_count(struct query_params *qp, struct filecount_info *fci) } fci->count = sqlite3_column_int(qp->stmt, 0); - fci->length = sqlite3_column_int(qp->stmt, 1); + fci->length = sqlite3_column_int64(qp->stmt, 1); return 0; } diff --git a/src/db.h b/src/db.h index 36f6c003..d79de4a6 100644 --- a/src/db.h +++ b/src/db.h @@ -350,7 +350,7 @@ struct watch_enum { struct filecount_info { uint32_t count; - uint32_t length; + uint64_t length; }; /* Directory ids must be in sync with the ids in Q_DIR* in db_init.c */ diff --git a/src/mpd.c b/src/mpd.c index de8dec6b..aec8571d 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -821,7 +821,7 @@ mpd_command_stats(struct evbuffer *evbuf, int argc, char **argv, char **errmsg) "albums: %d\n" "songs: %d\n" "uptime: %d\n" //in seceonds - "db_playtime: %d\n" + "db_playtime: %" PRIu64 "\n" "db_update: %d\n" "playtime: %d\n", artists, @@ -2470,7 +2470,7 @@ mpd_command_count(struct evbuffer *evbuf, int argc, char **argv, char **errmsg) evbuffer_add_printf(evbuf, "songs: %d\n" - "playtime: %d\n", + "playtime: %" PRIu64 "\n", fci.count, (fci.length / 1000));