diff options
author | Max Kellermann <max@duempel.org> | 2013-11-22 00:35:29 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-11-22 00:35:29 +0100 |
commit | c064e8d62f0d2b46159570f21708c2546970718d (patch) | |
tree | 42a242cec63c5c07c770db22552e77ddd1ee8a8d /src/Stats.cxx | |
parent | 099a2cb586524cf49dd3a9a0107ce003fd2e27e5 (diff) | |
download | mpd-c064e8d62f0d2b46159570f21708c2546970718d.tar.gz mpd-c064e8d62f0d2b46159570f21708c2546970718d.tar.xz mpd-c064e8d62f0d2b46159570f21708c2546970718d.zip |
DatabasePlugin: add method GetUpdateStamp()
Refactor SimpleDatabase::GetLastModified() to be generic for all
plugins. Remove the SimpleDatabase assumption from db_stats_print(),
allowing it to be implemented by all database plugins.
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx index d2d18d6a9..f224bdf49 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -83,10 +83,11 @@ db_stats_print(Client &client) stats.song_count, stats.total_duration); - if (db_is_simple()) + const time_t update_stamp = GetDatabase()->GetUpdateStamp(); + if (update_stamp > 0) client_printf(client, "db_update: %lu\n", - (unsigned long)db_get_mtime()); + (unsigned long)update_stamp); } void |