mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-07 15:52:11 +01:00
Don't seek outside the bounds of the song. See issue #95
This commit is contained in:
parent
24463136b9
commit
9cec39ffac
@ -248,7 +248,8 @@ void Player::CurrentMetadataChanged(const Song &metadata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Player::Seek(int seconds) {
|
void Player::Seek(int seconds) {
|
||||||
engine_->Seek(seconds * 1000);
|
int msec = qBound(0, seconds * 1000, int(engine_->length()));
|
||||||
|
engine_->Seek(msec);
|
||||||
|
|
||||||
// If we seek the track we don't want to submit it to last.fm
|
// If we seek the track we don't want to submit it to last.fm
|
||||||
playlist_->set_scrobbled(true);
|
playlist_->set_scrobbled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user