aboutsummaryrefslogtreecommitdiffstats
path: root/src/SongFilter.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-23 09:12:51 +0200
committerMax Kellermann <max@duempel.org>2014-06-23 09:18:11 +0200
commit848ed1478866e4d99c10aa962a6d976a6b989536 (patch)
tree5da39e4368027e24d690bc5d004b9cf6d30bc396 /src/SongFilter.cxx
parent4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6 (diff)
downloadmpd-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/SongFilter.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx
index 49c966b6f..235dfe7a0 100644
--- a/src/SongFilter.cxx
+++ b/src/SongFilter.cxx
@@ -203,6 +203,16 @@ SongFilter::Match(const Song &song) const
return true;
}
+bool
+SongFilter::HasOtherThanBase() const
+{
+ for (const auto &i : items)
+ if (i.GetTag() != LOCATE_TAG_BASE_TYPE)
+ return true;
+
+ return false;
+}
+
std::string
SongFilter::GetBase() const
{