diff options
author | Max Kellermann <max@duempel.org> | 2013-10-29 18:54:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-29 21:13:40 +0100 |
commit | 2aee1b86f364dfc9d897939081eb4f0403f9a729 (patch) | |
tree | 1ba3e441ad69018153e266900777b2eb85b47b40 /src/DatabaseSelection.cxx | |
parent | b5fc21b9f442904608a73e3c705e498c55769843 (diff) | |
download | mpd-2aee1b86f364dfc9d897939081eb4f0403f9a729.tar.gz mpd-2aee1b86f364dfc9d897939081eb4f0403f9a729.tar.xz mpd-2aee1b86f364dfc9d897939081eb4f0403f9a729.zip |
SongFilter: add special keyword "base"
Restores the features from the previous draft commands "findin" /
"searchin".
Diffstat (limited to '')
-rw-r--r-- | src/DatabaseSelection.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/DatabaseSelection.cxx b/src/DatabaseSelection.cxx index a372d5862..2164ba2cd 100644 --- a/src/DatabaseSelection.cxx +++ b/src/DatabaseSelection.cxx @@ -20,6 +20,16 @@ #include "DatabaseSelection.hxx" #include "SongFilter.hxx" +DatabaseSelection::DatabaseSelection(const char *_uri, bool _recursive, + const SongFilter *_filter) + :uri(_uri), recursive(_recursive), filter(_filter) +{ + /* optimization: if the caller didn't specify a base URI, pick + the one from SongFilter */ + if (uri.empty() && filter != nullptr) + uri = filter->GetBase(); +} + bool DatabaseSelection::Match(const Song &song) const { |