diff options
Diffstat (limited to 'src/DatabaseSelection.cxx')
-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 { |