Commit aca08155 authored by Max Kellermann's avatar Max Kellermann

queue/PlaylistControl: use PlaylistError::NotPlaying()

parent a71efacd
......@@ -121,11 +121,8 @@ playlist::PlayId(PlayerControl &pc, int id, Error &error)
bool
playlist::PlayNext(PlayerControl &pc, Error &error)
{
if (!playing) {
error.Set(playlist_domain, int(PlaylistResult::NOT_PLAYING),
"Not playing");
return false;
}
if (!playing)
throw PlaylistError::NotPlaying();
assert(!queue.IsEmpty());
assert(queue.IsValidOrder(current));
......@@ -173,11 +170,8 @@ playlist::PlayNext(PlayerControl &pc, Error &error)
bool
playlist::PlayPrevious(PlayerControl &pc, Error &error)
{
if (!playing) {
error.Set(playlist_domain, int(PlaylistResult::NOT_PLAYING),
"Not playing");
return false;
}
if (!playing)
throw PlaylistError::NotPlaying();
assert(!queue.IsEmpty());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment