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,6 +904,7 @@ PlayerControl::LockUpdateSongTag(DetachedSong &song,
|
|||||||
streams may change tags dynamically */
|
streams may change tags dynamically */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (new_tag != song.GetTag()) {
|
||||||
song.SetTag(new_tag);
|
song.SetTag(new_tag);
|
||||||
|
|
||||||
LockSetTaggedSong(song);
|
LockSetTaggedSong(song);
|
||||||
@@ -912,6 +913,7 @@ PlayerControl::LockUpdateSongTag(DetachedSong &song,
|
|||||||
receives this event */
|
receives this event */
|
||||||
listener.OnPlayerTagModified();
|
listener.OnPlayerTagModified();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
PlayerControl::PlayChunk(DetachedSong &song, MusicChunkPtr chunk,
|
PlayerControl::PlayChunk(DetachedSong &song, MusicChunkPtr chunk,
|
||||||
|
Reference in New Issue
Block a user