Stop streams on PlayPause.

This commit is contained in:
John Maguire 2010-05-27 13:17:28 +00:00
parent 3927d91cf1
commit 722981e71d

View File

@ -218,18 +218,20 @@ void Player::TrackEnded() {
void Player::PlayPause() {
switch (engine_->state()) {
case Engine::Paused:
qDebug() << "Unpausing";
engine_->Unpause();
break;
case Engine::Playing:
case Engine::Playing: {
// We really shouldn't pause last.fm streams
if (current_item_->options() & PlaylistItem::PauseDisabled)
break;
qDebug() << "Pausing";
engine_->Pause();
// Stopping seems like a reasonable thing to do (especially on mac where there
// is no media key for stop).
if (current_item_->options() & PlaylistItem::PauseDisabled) {
engine_->Stop();
} else {
engine_->Pause();
}
break;
}
case Engine::Empty:
case Engine::Idle: {