diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 268d18395..45cb7a566 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ * fixed a bug that was preventing the update check from displaying a dialog on completion. * fixed now playing readout ellipsizing. +* fixed a bug where last.fm scrobbles may get posted twice per track. -------------------------------------------------------------------------------- diff --git a/src/musikcore/audio/PlaybackService.cpp b/src/musikcore/audio/PlaybackService.cpp index ace652105..d6b0ea4a8 100755 --- a/src/musikcore/audio/PlaybackService.cpp +++ b/src/musikcore/audio/PlaybackService.cpp @@ -498,7 +498,7 @@ void PlaybackService::OnTrackChanged(size_t pos, TrackPtr track) { this->TrackChanged(this->index, track); this->messageQueue.Remove(this, MESSAGE_MARK_TRACK_PLAYED); - if (track && this->GetPlaybackState() == PlaybackState::Playing) { + if (track && this->transport->GetStreamState() == StreamState::Playing) { /* TODO: maybe consider folding Scrobble() the `MarkTrackAsPlayed` logic? needs a bit more thought */ lastfm::Scrobble(track);