make MPD::Connection::Toggle() run playback if player is stopped
This commit is contained in:
@@ -413,12 +413,18 @@ void Connection::Toggle()
|
|||||||
if (!isCommandsListEnabled)
|
if (!isCommandsListEnabled)
|
||||||
{
|
{
|
||||||
GoBusy();
|
GoBusy();
|
||||||
mpd_run_toggle_pause(itsConnection);;
|
if (isPlaying())
|
||||||
|
mpd_run_toggle_pause(itsConnection);
|
||||||
|
else
|
||||||
|
mpd_run_play(itsConnection);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(!isIdle);
|
assert(!isIdle);
|
||||||
mpd_send_toggle_pause(itsConnection);
|
if (isPlaying())
|
||||||
|
mpd_send_toggle_pause(itsConnection);
|
||||||
|
else
|
||||||
|
mpd_send_toggle_pause(itsConnection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user