Fixed last.fm double scrobble bug.

This commit is contained in:
Casey Langen 2020-12-20 14:19:32 -08:00
parent 05ea062e03
commit 210c98b8ad
2 changed files with 2 additions and 1 deletions

View File

@ -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.
--------------------------------------------------------------------------------

View File

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