1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-14 09:44:51 +01:00

Delay pause on resume playback

This commit is contained in:
Jonas Kvinge 2021-07-23 21:54:46 +02:00
parent 4abac65316
commit 62a5031ccf

View File

@ -1458,7 +1458,7 @@ void MainWindow::ResumePlayback() {
std::shared_ptr<QMetaObject::Connection> connection = std::make_shared<QMetaObject::Connection>();
*connection = QObject::connect(app_->player(), &Player::Playing, app_->player(), [this, connection]() {
QObject::disconnect(*connection);
app_->player()->PlayPause();
QTimer::singleShot(300, app_->player(), &Player::PlayPauseHelper);
});
}
app_->player()->Play(playback_position * kNsecPerSec);