From ff1c1107f3a7ad0cfbdfefbe26f2f5e1cb9b00c5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 21 Nov 2013 23:30:49 +0100 Subject: Stats: auto-reload statistics with proxy plugin --- src/Stats.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/Stats.cxx b/src/Stats.cxx index 2baeafa39..8f9d90b0f 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -62,6 +62,13 @@ void stats_update(void) void stats_print(Client &client) { + if (!db_is_simple()) + /* reload statistics if we're using the "proxy" + database plugin */ + /* TODO: move this into the "proxy" database plugin as + an "idle" handler */ + stats_update(); + client_printf(client, "artists: %u\n" "albums: %u\n" -- cgit v1.2.3