From d93477d1369e55d76476952f30463461e47af443 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sun, 4 Jan 2009 20:30:27 +0100
Subject: update: refresh stats when database update is finished

---
 src/update.c | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src')

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);
 	}
 }
 
-- 
cgit v1.2.3