queue/PlaylistControl: use PlaylistError::NotPlaying()
This commit is contained in:
parent
a71efacd1e
commit
aca081557a
@ -121,11 +121,8 @@ playlist::PlayId(PlayerControl &pc, int id, Error &error)
|
|||||||
bool
|
bool
|
||||||
playlist::PlayNext(PlayerControl &pc, Error &error)
|
playlist::PlayNext(PlayerControl &pc, Error &error)
|
||||||
{
|
{
|
||||||
if (!playing) {
|
if (!playing)
|
||||||
error.Set(playlist_domain, int(PlaylistResult::NOT_PLAYING),
|
throw PlaylistError::NotPlaying();
|
||||||
"Not playing");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(!queue.IsEmpty());
|
assert(!queue.IsEmpty());
|
||||||
assert(queue.IsValidOrder(current));
|
assert(queue.IsValidOrder(current));
|
||||||
@ -173,11 +170,8 @@ playlist::PlayNext(PlayerControl &pc, Error &error)
|
|||||||
bool
|
bool
|
||||||
playlist::PlayPrevious(PlayerControl &pc, Error &error)
|
playlist::PlayPrevious(PlayerControl &pc, Error &error)
|
||||||
{
|
{
|
||||||
if (!playing) {
|
if (!playing)
|
||||||
error.Set(playlist_domain, int(PlaylistResult::NOT_PLAYING),
|
throw PlaylistError::NotPlaying();
|
||||||
"Not playing");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(!queue.IsEmpty());
|
assert(!queue.IsEmpty());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user