From 6acba7350938c099afab7bec04c8dc9adf674424 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Jan 2009 20:57:06 +0100 Subject: stats: added stats_update() --- src/stats.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/stats.c') diff --git a/src/stats.c b/src/stats.c index 53c785614..dd56f754b 100644 --- a/src/stats.c +++ b/src/stats.c @@ -24,6 +24,7 @@ #include "client.h" #include "player_control.h" #include "strset.h" +#include "dbUtils.h" Stats stats; @@ -33,6 +34,12 @@ void initStats(void) stats.numberOfSongs = 0; } +void stats_update(void) +{ + stats.numberOfSongs = countSongsIn(NULL); + stats.dbPlayTime = sumSongTimesIn(NULL); +} + struct visit_data { enum tag_type type; struct strset *set; -- cgit v1.2.3