diff options
author | Max Kellermann <max@duempel.org> | 2009-01-04 20:30:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-13 23:09:03 +0100 |
commit | d93477d1369e55d76476952f30463461e47af443 (patch) | |
tree | c982a00d730f67a511c26c0f908f6d4a1ea85409 | |
parent | 9f21cb9dda22d0c589b41acfd04da1a1969d68da (diff) | |
download | mpd-d93477d1369e55d76476952f30463461e47af443.tar.gz mpd-d93477d1369e55d76476952f30463461e47af443.tar.xz mpd-d93477d1369e55d76476952f30463461e47af443.zip |
update: refresh stats when database update is finished
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/update.c | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -4,6 +4,8 @@ MPD 0.14.1 - not yet released - id3: strip leading and trailing whitespace from ID3 tags * audio outputs: - jack: allocate default port names (fixes a crash) +* update: + - refresh stats after update * log: automatically append newline * fix setenv() conflict on Solaris * configure.ac: check for pkg-config before using it 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); } } |