From a542a0804ad44e3d090e5b1091d49963a8f58962 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Jul 2022 13:51:28 +0200 Subject: [PATCH] Partition: OnPlayerTagModified() emits IDLE_PLAYER Replaces one global idle_add() call. --- src/Partition.cxx | 4 ++++ src/player/Thread.cxx | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Partition.cxx b/src/Partition.cxx index e2967daa4..63ce07f2e 100644 --- a/src/Partition.cxx +++ b/src/Partition.cxx @@ -193,6 +193,10 @@ void Partition::OnPlayerTagModified() noexcept { EmitGlobalEvent(TAG_MODIFIED); + + /* notify all clients that the tag of the current song has + changed */ + EmitIdle(IDLE_PLAYER); } void diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index 991a6bb98..e06cc414f 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -931,10 +931,6 @@ PlayerControl::LockUpdateSongTag(DetachedSong &song, /* the main thread will update the playlist version when he receives this event */ listener.OnPlayerTagModified(); - - /* notify all clients that the tag of the current song has - changed */ - idle_add(IDLE_PLAYER); } inline void