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-13 23:09:03 +0100
commitd93477d1369e55d76476952f30463461e47af443 (patch)
treec982a00d730f67a511c26c0f908f6d4a1ea85409 /src/update.c
parent9f21cb9dda22d0c589b41acfd04da1a1969d68da (diff)
downloadmpd-d93477d1369e55d76476952f30463461e47af443.tar.gz
mpd-d93477d1369e55d76476952f30463461e47af443.tar.xz
mpd-d93477d1369e55d76476952f30463461e47af443.zip
update: refresh stats when database update is finished
Diffstat (limited to 'src/update.c')
-rw-r--r--src/update.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c
index ae079b74c..10108f0a9 100644
--- a/src/update.c
+++ b/src/update.c
@@ -32,6 +32,8 @@
#include "update.h"
#include "idle.h"
#include "conf.h"
+#include "stats.h"
+#include "dbUtils.h"
#include <glib.h>
@@ -597,6 +599,9 @@ void reap_update_task(void)
spawn_update_task(path);
} else {
progress = UPDATE_PROGRESS_IDLE;
+
+ stats.numberOfSongs = countSongsIn(NULL);
+ stats.dbPlayTime = sumSongTimesIn(NULL);
}
}