aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/PlayerCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-11 19:32:32 +0100
committerMax Kellermann <max@duempel.org>2015-11-11 19:56:01 +0100
commit5e93c05095eff2385f02fa946fdb2e97353b1843 (patch)
treeaebf91037da46697f0db3e4a0cbf28de2d8f3e21 /src/command/PlayerCommands.cxx
parent0f4f04eaa4b697ef95411516a3c2145a394e0c64 (diff)
downloadmpd-5e93c05095eff2385f02fa946fdb2e97353b1843.tar.gz
mpd-5e93c05095eff2385f02fa946fdb2e97353b1843.tar.xz
mpd-5e93c05095eff2385f02fa946fdb2e97353b1843.zip
queue/Playlist: seek methods return bool/Error instead of PlaylistResult
Diffstat (limited to '')
-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