From 6859c22b692f153c6f860c0336dd686f94a11c08 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 29 Oct 2013 19:54:40 +0100 Subject: SongFilter: "any" does not match file name According to the protocol documentation, matching the file name was wrong. This removes some awkward special-case code. --- src/SongFilter.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx index 41f1e0a64..7592f2665 100644 --- a/src/SongFilter.cxx +++ b/src/SongFilter.cxx @@ -134,12 +134,9 @@ SongFilter::Item::Match(const Tag &_tag) const bool SongFilter::Item::Match(const Song &song) const { - if (tag == LOCATE_TAG_FILE_TYPE || tag == LOCATE_TAG_ANY_TYPE) { + if (tag == LOCATE_TAG_FILE_TYPE) { const auto uri = song.GetURI(); - const bool result = StringMatch(uri.c_str()); - - if (result || tag == LOCATE_TAG_FILE_TYPE) - return result; + return StringMatch(uri.c_str()); } return song.tag != NULL && Match(*song.tag); -- cgit v1.2.3