Don't seek outside the bounds of the song. See issue #95

This commit is contained in:
David Sansome 2010-04-14 13:22:50 +00:00
parent 24463136b9
commit 9cec39ffac
1 changed files with 2 additions and 1 deletions

View File

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