diff options
author | Max Kellermann <max@duempel.org> | 2012-08-08 08:19:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-08 09:28:13 +0200 |
commit | aa55d759f555782dc9cf2f9f6d489502310490a6 (patch) | |
tree | 1e9a8c602cb2b1c5dcecc91909fa74084337cafd /src/Stats.cxx | |
parent | 2043579f71b4f5204272ed8615cffe1c3c4d8473 (diff) | |
download | mpd-aa55d759f555782dc9cf2f9f6d489502310490a6.tar.gz mpd-aa55d759f555782dc9cf2f9f6d489502310490a6.tar.xz mpd-aa55d759f555782dc9cf2f9f6d489502310490a6.zip |
DatabaseGlue: add function db_is_simple()
Preparing for non-"simple" database plugins.
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx index 5b5008cee..07273bfdb 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -119,14 +119,18 @@ int stats_print(struct client *client) "songs: %i\n" "uptime: %li\n" "playtime: %li\n" - "db_playtime: %li\n" - "db_update: %li\n", + "db_playtime: %li\n", stats.artist_count, stats.album_count, stats.song_count, (long)g_timer_elapsed(stats.timer, NULL), (long)(pc_get_total_play_time(client->player_control) + 0.5), - stats.song_duration, - (long)db_get_mtime()); + stats.song_duration); + + if (db_is_simple()) + client_printf(client, + "db_update: %li\n", + (long)db_get_mtime()); + return 0; } |