aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/DatabasePrint.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/DatabasePrint.cxx b/src/DatabasePrint.cxx
index 093b0bd46..1f8999dc3 100644
--- a/src/DatabasePrint.cxx
+++ b/src/DatabasePrint.cxx
@@ -34,7 +34,7 @@
#include <functional>
static bool
-PrintDirectory(Client *client, const Directory &directory)
+PrintDirectoryBrief(Client *client, const Directory &directory)
{
if (!directory.IsRoot())
client_printf(client, "directory: %s\n", directory.GetPath());
@@ -42,6 +42,18 @@ PrintDirectory(Client *client, const Directory &directory)
return true;
}
+static bool
+PrintDirectoryFull(Client *client, const Directory &directory)
+{
+ if (!directory.IsRoot()) {
+ client_printf(client, "directory: %s\n", directory.GetPath());
+ time_print(client, "Last-Modified", directory.mtime);
+ }
+
+ return true;
+}
+
+
static void
print_playlist_in_directory(Client *client,
const Directory &directory,
@@ -114,7 +126,8 @@ db_selection_print(Client *client, const DatabaseSelection &selection,
using namespace std::placeholders;
const auto d = selection.filter == nullptr
- ? std::bind(PrintDirectory, client, _1)
+ ? std::bind(full ? PrintDirectoryFull : PrintDirectoryBrief,
+ client, _1)
: VisitDirectory();
const auto s = std::bind(full ? PrintSongFull : PrintSongBrief,
client, _1);