make MPD::Connection::Toggle() run playback if player is stopped

master
Andrzej Rybczak 16 years ago
parent 43dcc8bd54
commit 05fc53ba32
  1. 10
      src/mpdpp.cpp

@ -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);
} }
} }

Loading…
Cancel
Save