aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 20:30:27 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 20:30:27 +0100
commit6fb8c5493910097636d2122cb57894375c16901d (patch)
tree4bab967e180a41f157ae3ca8e6171703bcfa613c /src/update.c
parenta9bd64b1dd2bbf6a6146d56d91da49ee5f3f06c3 (diff)
downloadmpd-6fb8c5493910097636d2122cb57894375c16901d.tar.gz
mpd-6fb8c5493910097636d2122cb57894375c16901d.tar.xz
mpd-6fb8c5493910097636d2122cb57894375c16901d.zip
update: refresh stats when database update is finished
Diffstat (limited to '')
-rw-r--r--src/update.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c
index 80fa3add3..5455f1da8 100644
--- a/src/update.c
+++ b/src/update.c
@@ -31,6 +31,8 @@
#include "update.h"
#include "idle.h"
#include "conf.h"
+#include "stats.h"
+#include "dbUtils.h"
#include "main.h"
#include <glib.h>
@@ -738,6 +740,9 @@ static void update_finished_event(void)
spawn_update_task(path);
} else {
progress = UPDATE_PROGRESS_IDLE;
+
+ stats.numberOfSongs = countSongsIn(NULL);
+ stats.dbPlayTime = sumSongTimesIn(NULL);
}
}