mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-14 09:44:51 +01:00
Only update scrobble point in SetStreamMetadata when length is changed
This commit is contained in:
parent
a3ae9acebb
commit
f2078271b6
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user