aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/PlayerCommands.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/PlayerCommands.cxx')
-rw-r--r--src/command/PlayerCommands.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx
index b9fc7d578..9cfd58a93 100644
--- a/src/command/PlayerCommands.cxx
+++ b/src/command/PlayerCommands.cxx
@@ -296,9 +296,10 @@ handle_seek(Client &client, Request args, Response &r)
if (!args.Parse(0, song, r) || !args.Parse(1, seek_time, r))
return CommandResult::ERROR;
- PlaylistResult result =
- client.partition.SeekSongPosition(song, seek_time);
- return print_playlist_result(r, result);
+ Error error;
+ return client.partition.SeekSongPosition(song, seek_time, error)
+ ? CommandResult::OK
+ : print_error(r, error);
}
CommandResult
@@ -311,9 +312,10 @@ handle_seekid(Client &client, Request args, Response &r)
if (!args.Parse(1, seek_time, r))
return CommandResult::ERROR;
- PlaylistResult result =
- client.partition.SeekSongId(id, seek_time);
- return print_playlist_result(r, result);
+ Error error;
+ return client.partition.SeekSongId(id, seek_time, error)
+ ? CommandResult::OK
+ : print_error(r, error);
}
CommandResult
@@ -325,9 +327,10 @@ handle_seekcur(Client &client, Request args, Response &r)
if (!ParseCommandArg(r, seek_time, p))
return CommandResult::ERROR;
- PlaylistResult result =
- client.partition.SeekCurrent(seek_time, relative);
- return print_playlist_result(r, result);
+ Error error;
+ return client.partition.SeekCurrent(seek_time, relative, error)
+ ? CommandResult::OK
+ : print_error(r, error);
}
CommandResult