diff options
author | Max Kellermann <max@duempel.org> | 2012-08-07 23:59:17 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-08 00:47:45 +0200 |
commit | 0823711106912fc75f1bdb2461243b12ba670f8b (patch) | |
tree | ee2bc012a9c3fb8e25b149a0b8f19d2421795256 /src/DatabaseQueue.cxx | |
parent | 860e9eb8c9ad07721aad4526046753d6fcc3b3ac (diff) | |
download | mpd-0823711106912fc75f1bdb2461243b12ba670f8b.tar.gz mpd-0823711106912fc75f1bdb2461243b12ba670f8b.tar.xz mpd-0823711106912fc75f1bdb2461243b12ba670f8b.zip |
locate: add a per-item "fold_case" flag
Merge locate_song_search() and locate_song_match().
Diffstat (limited to 'src/DatabaseQueue.cxx')
-rw-r--r-- | src/DatabaseQueue.cxx | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx index 7bc18363f..acbf90741 100644 --- a/src/DatabaseQueue.cxx +++ b/src/DatabaseQueue.cxx @@ -61,7 +61,7 @@ MatchAddSong(struct player_control *pc, const struct locate_item_list *criteria, song &song, GError **error_r) { - return !locate_song_match(&song, criteria) || + return !locate_list_song_match(&song, criteria) || AddToQueue(pc, song, error_r); } @@ -75,24 +75,3 @@ findAddIn(struct player_control *pc, const char *uri, const auto f = std::bind(MatchAddSong, pc, criteria, _1, _2); return GetDatabase()->Visit(selection, f, error_r); } - -static bool -SearchAddSong(struct player_control *pc, - const struct locate_item_list *criteria, - song &song, GError **error_r) -{ - return !locate_song_search(&song, criteria) || - AddToQueue(pc, song, error_r); -} - -bool -search_add_songs(struct player_control *pc, const char *uri, - const struct locate_item_list *criteria, - GError **error_r) -{ - const DatabaseSelection selection(uri, true); - - using namespace std::placeholders; - const auto f = std::bind(SearchAddSong, pc, criteria, _1, _2); - return GetDatabase()->Visit(selection, f, error_r); -} |