aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 20:49:51 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 20:49:51 +0100
commit6d2e4f4e727920974d7621ce4515397e3ff4d40d (patch)
tree4cc6fe5b0f15533a648a0828cfe178d4b7bfad43 /src
parent38bf81285f492b38530f16f8c0e372b0f9b6a116 (diff)
downloadmpd-6d2e4f4e727920974d7621ce4515397e3ff4d40d.tar.gz
mpd-6d2e4f4e727920974d7621ce4515397e3ff4d40d.tar.xz
mpd-6d2e4f4e727920974d7621ce4515397e3ff4d40d.zip
player: emit PLAYLIST event when stream tag changes
Commit b3e2635a introduced a regression: when a stream tag was changed, the playlist version had to be updated. This was done in syncCurrentPlayerDecodeMetadata(), called by syncPlayerAndPlaylist(). After b3e2635a, this was not called anymore. Fix this by emitting PIPE_EVENT_PLAYLIST.
Diffstat (limited to 'src')
-rw-r--r--src/player_thread.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 5ca5b5b02..55a3132bb 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -116,6 +116,9 @@ static int player_wait_for_decoder(struct player *player)
player->queued = false;
player->decoder_starting = true;
+ /* call syncPlaylistWithQueue() in the main thread */
+ event_pipe_emit(PIPE_EVENT_PLAYLIST);
+
return 0;
}
@@ -242,6 +245,10 @@ play_chunk(struct song *song, struct music_chunk *chunk,
if (old_tag != NULL)
tag_free(old_tag);
+ /* the main thread will update the playlist
+ version when he receives this event */
+ event_pipe_emit(PIPE_EVENT_PLAYLIST);
+
/* notify all clients that the tag of the
current song has changed */
idle_add(IDLE_PLAYER);