diff options
author | Max Kellermann <max@duempel.org> | 2014-06-23 10:13:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-23 10:13:50 +0200 |
commit | fa1fb47d7553a15f8bde1636364c0e6dba57c39c (patch) | |
tree | d458b289b803690651efa0759852df812de274eb /src/db/Selection.cxx | |
parent | b9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd (diff) | |
parent | 848ed1478866e4d99c10aa962a6d976a6b989536 (diff) | |
download | mpd-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.cxx | 12 |
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); |