mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +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) {
|
||||
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
|
||||
playlist_->set_scrobbled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user