diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index d286894cf..672b6fa5e 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -1496,6 +1496,8 @@ void Playlist::SetStreamMetadata(const QUrl &url, const Song &song, const bool m //qLog(Debug) << "Setting temporary metadata for" << url; + bool length_changed = song.length_nanosec() != current_item_metadata().length_nanosec(); + current_item()->SetTemporaryMetadata(song); if (minor) { @@ -1510,7 +1512,7 @@ void Playlist::SetStreamMetadata(const QUrl &url, const Song &song, const bool m InformOfCurrentSongChange(); } - UpdateScrobblePoint(); + if (length_changed) UpdateScrobblePoint(); } @@ -1977,7 +1979,7 @@ void Playlist::SkipTracks(const QModelIndexList &source_indexes) { } -void Playlist::UpdateScrobblePoint(qint64 seek_point_nanosec) { +void Playlist::UpdateScrobblePoint(const qint64 seek_point_nanosec) { const qint64 length = current_item_metadata().length_nanosec(); diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h index a939b9881..ff5f0a197 100644 --- a/src/playlist/playlist.h +++ b/src/playlist/playlist.h @@ -222,7 +222,7 @@ class Playlist : public QAbstractListModel { void set_scrobbled(bool state) { scrobbled_ = state; } void set_nowplaying(bool state) { nowplaying_ = state; } qint64 scrobble_point_nanosec() const { return scrobble_point_; } - void UpdateScrobblePoint(qint64 seek_point_nanosec = 0); + void UpdateScrobblePoint(const qint64 seek_point_nanosec = 0); // Changing the playlist void InsertItems (const PlaylistItemList &items, int pos = -1, bool play_now = false, bool enqueue = false, bool enqueue_next = false);