diff options
author | Max Kellermann <max@duempel.org> | 2014-06-23 09:12:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-23 09:18:11 +0200 |
commit | 848ed1478866e4d99c10aa962a6d976a6b989536 (patch) | |
tree | 5da39e4368027e24d690bc5d004b9cf6d30bc396 /src/DatabaseSelection.cxx | |
parent | 4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6 (diff) | |
download | mpd-848ed1478866e4d99c10aa962a6d976a6b989536.tar.gz mpd-848ed1478866e4d99c10aa962a6d976a6b989536.tar.xz mpd-848ed1478866e4d99c10aa962a6d976a6b989536.zip |
db/proxy: fall back to recursive walk on old libmpdclient/MPD
Error message was 'too few arguments for "find"' because the "base"
constraint was not supported, and no other constraints remained.
Diffstat (limited to '')
-rw-r--r-- | src/DatabaseSelection.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DatabaseSelection.cxx b/src/DatabaseSelection.cxx index 96018cbae..ffe5f7d39 100644 --- a/src/DatabaseSelection.cxx +++ b/src/DatabaseSelection.cxx @@ -31,6 +31,18 @@ DatabaseSelection::DatabaseSelection(const char *_uri, bool _recursive, } bool +DatabaseSelection::IsEmpty() const +{ + return uri.empty() && (filter == nullptr || filter->IsEmpty()); +} + +bool +DatabaseSelection::HasOtherThanBase() const +{ + return filter != nullptr && filter->HasOtherThanBase(); +} + +bool DatabaseSelection::Match(const Song &song) const { return filter == nullptr || filter->Match(song); |