aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/PlaylistCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/command/PlaylistCommands.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/command/PlaylistCommands.cxx b/src/command/PlaylistCommands.cxx
index 35dc0ceb3..bc426db4e 100644
--- a/src/command/PlaylistCommands.cxx
+++ b/src/command/PlaylistCommands.cxx
@@ -66,16 +66,14 @@ handle_load(Client &client, int argc, char *argv[])
} else if (!check_range(client, &start_index, &end_index, argv[2]))
return CommandResult::ERROR;
+ Error error;
const SongLoader loader(client);
- const PlaylistResult result =
- playlist_open_into_queue(argv[1],
- start_index, end_index,
- client.playlist,
- client.player_control, loader);
- if (result != PlaylistResult::NO_SUCH_LIST)
- return print_playlist_result(client, result);
+ if (!playlist_open_into_queue(argv[1],
+ start_index, end_index,
+ client.playlist,
+ client.player_control, loader, error))
+ return print_error(client, error);
- Error error;
if (playlist_load_spl(client.playlist, client.player_control,
argv[1], start_index, end_index,
error))