aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Selection.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-23 10:13:50 +0200
committerMax Kellermann <max@duempel.org>2014-06-23 10:13:50 +0200
commitfa1fb47d7553a15f8bde1636364c0e6dba57c39c (patch)
treed458b289b803690651efa0759852df812de274eb /src/db/Selection.cxx
parentb9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd (diff)
parent848ed1478866e4d99c10aa962a6d976a6b989536 (diff)
downloadmpd-fa1fb47d7553a15f8bde1636364c0e6dba57c39c.tar.gz
mpd-fa1fb47d7553a15f8bde1636364c0e6dba57c39c.tar.xz
mpd-fa1fb47d7553a15f8bde1636364c0e6dba57c39c.zip
Merge branch 'v0.18.x'
Diffstat (limited to 'src/db/Selection.cxx')
-rw-r--r--src/db/Selection.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/db/Selection.cxx b/src/db/Selection.cxx
index 96382eed7..a886916cb 100644
--- a/src/db/Selection.cxx
+++ b/src/db/Selection.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 LightSong &song) const
{
return filter == nullptr || filter->Match(song);