1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 11:35:24 +01:00

fixes issue #553 ('seek forward' and 'seek backward' hotkeys worked wrong)

This commit is contained in:
Paweł Bara 2011-01-19 16:05:16 +00:00
parent a575dac451
commit 1c1d9551bb
2 changed files with 12 additions and 2 deletions

View File

@ -292,6 +292,14 @@ void Player::Seek(int seconds) {
emit Seeked(msec * 1000);
}
void Player::SeekForward() {
Seek(engine()->position() / 1000 + 5);
}
void Player::SeekBackward() {
Seek(engine()->position() / 1000 - 5);
}
void Player::EngineMetadataReceived(const Engine::SimpleMetaBundle& bundle) {
PlaylistItemPtr item = playlists_->active()->current_item();
if (!item)

View File

@ -76,8 +76,10 @@ class Player : public QObject {
void VolumeUp() { SetVolume(GetVolume() + 5); }
void VolumeDown() { SetVolume(GetVolume() - 5); }
void Seek(int seconds);
void SeekForward() { Seek(+5); }
void SeekBackward() { Seek(-5); }
// Moves the position of the currently playing song five seconds forward.
void SeekForward();
// Moves the position of the currently playing song five seconds backwards.
void SeekBackward();
void HandleSpecialLoad(const PlaylistItem::SpecialLoadResult& result);
void CurrentMetadataChanged(const Song& metadata);