diff options
author | Max Kellermann <max@musicpd.org> | 2019-02-27 13:48:02 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-02-27 13:49:22 +0100 |
commit | 713c1f2ba9c18a97a4e1f12642e59e87b62e9080 (patch) | |
tree | f582c988f482204639191c5173d588e9c10823e1 /src/command/PlaylistCommands.cxx | |
parent | 44422b2b2f0a0bf29ffadfac0814b9bcd17db564 (diff) | |
parent | a149bc4c5db66a7450f2723c4d9dd0b9542e94b0 (diff) |
Merge branch 'feature/playlist' of git://github.com/miccoli/MPD
Diffstat (limited to 'src/command/PlaylistCommands.cxx')
-rw-r--r-- | src/command/PlaylistCommands.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx index 77131227d..858cd2029 100644 --- a/src/command/PlaylistCommands.cxx +++ b/src/command/PlaylistCommands.cxx @@ -38,6 +38,7 @@ #include "util/UriUtil.hxx" #include "util/ConstBuffer.hxx" #include "util/ChronoUtil.hxx" +#include "LocateUri.hxx" bool playlist_commands_available() noexcept @@ -66,12 +67,17 @@ handle_save(Client &client, Request args, gcc_unused Response &r) CommandResult handle_load(Client &client, Request args, gcc_unused Response &r) { + const auto uri = LocateUri(args.front(), &client +#ifdef ENABLE_DATABASE + , nullptr +#endif + ); RangeArg range = args.ParseOptional(1, RangeArg::All()); const ScopeBulkEdit bulk_edit(client.GetPartition()); const SongLoader loader(client); - playlist_open_into_queue(args.front(), + playlist_open_into_queue(uri, range.start, range.end, client.GetPlaylist(), client.GetPlayerControl(), loader); @@ -81,7 +87,11 @@ handle_load(Client &client, Request args, gcc_unused Response &r) CommandResult handle_listplaylist(Client &client, Request args, Response &r) { - const char *const name = args.front(); + const auto name = LocateUri(args.front(), &client +#ifdef ENABLE_DATABASE + , nullptr +#endif + ); if (playlist_file_print(r, client.GetPartition(), SongLoader(client), name, false)) @@ -93,7 +103,11 @@ handle_listplaylist(Client &client, Request args, Response &r) CommandResult handle_listplaylistinfo(Client &client, Request args, Response &r) { - const char *const name = args.front(); + const auto name = LocateUri(args.front(), &client +#ifdef ENABLE_DATABASE + , nullptr +#endif + ); if (playlist_file_print(r, client.GetPartition(), SongLoader(client), name, true)) |