diff options
author | Max Kellermann <max@musicpd.org> | 2019-03-25 18:48:31 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-03-25 19:04:34 +0100 |
commit | c60d374fc85364458f9fce242370abcd7fc8f40c (patch) | |
tree | 603a6436bbf1a8ae24b88217498cfe6ca4dcbf18 /src/command | |
parent | de4fd4c0596ba41c6fd1bc7ff617bcf807854562 (diff) |
db/DatabasePlaylist: pass DatabaseSelection to search_add_to_playlist()
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/DatabaseCommands.cxx | 3 | ||||
-rw-r--r-- | src/command/PlaylistCommands.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index 3f0bc4f51..262254b55 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -188,9 +188,10 @@ handle_searchaddpl(Client &client, Request args, Response &r) filter.Optimize(); const Database &db = client.GetDatabaseOrThrow(); + const DatabaseSelection selection("", true, &filter); search_add_to_playlist(db, client.GetStorage(), - "", playlist, &filter); + playlist, selection); return CommandResult::OK; } diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx index 858cd2029..9c0ae779d 100644 --- a/src/command/PlaylistCommands.cxx +++ b/src/command/PlaylistCommands.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "PlaylistCommands.hxx" #include "Request.hxx" +#include "db/Selection.hxx" #include "db/DatabasePlaylist.hxx" #include "CommandError.hxx" #include "PlaylistSave.hxx" @@ -180,9 +181,10 @@ handle_playlistadd(Client &client, Request args, gcc_unused Response &r) } else { #ifdef ENABLE_DATABASE const Database &db = client.GetDatabaseOrThrow(); + const DatabaseSelection selection(uri, true, nullptr); search_add_to_playlist(db, client.GetStorage(), - uri, playlist, nullptr); + playlist, selection); #else r.Error(ACK_ERROR_NO_EXIST, "directory or file not found"); return CommandResult::ERROR; |