player/Thread: update song tag from remote stream only if changed.
Some streams send the same tags frequently, causing unnecessary player queue update events.
This commit is contained in:
@@ -904,13 +904,15 @@ PlayerControl::LockUpdateSongTag(DetachedSong &song,
|
|||||||
streams may change tags dynamically */
|
streams may change tags dynamically */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
song.SetTag(new_tag);
|
if (new_tag != song.GetTag()) {
|
||||||
|
song.SetTag(new_tag);
|
||||||
|
|
||||||
LockSetTaggedSong(song);
|
LockSetTaggedSong(song);
|
||||||
|
|
||||||
/* the main thread will update the playlist version when he
|
/* the main thread will update the playlist version when he
|
||||||
receives this event */
|
receives this event */
|
||||||
listener.OnPlayerTagModified();
|
listener.OnPlayerTagModified();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
Reference in New Issue
Block a user