diff options
Diffstat (limited to 'src/Playlist.cxx')
-rw-r--r-- | src/Playlist.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Playlist.cxx b/src/Playlist.cxx index 570d64b19..296b52769 100644 --- a/src/Playlist.cxx +++ b/src/Playlist.cxx @@ -22,6 +22,7 @@ #include "PlaylistError.hxx" #include "PlayerControl.hxx" #include "Song.hxx" +#include "tag/Tag.hxx" #include "Idle.hxx" #include "Log.hxx" @@ -35,13 +36,17 @@ playlist::FullIncrementVersions() } void -playlist::TagChanged() +playlist::TagModified(Song &&song) { - if (!playing) + if (!playing || song.tag == nullptr) return; assert(current >= 0); + Song ¤t_song = queue.GetOrder(current); + if (SongEquals(song, current_song)) + current_song.ReplaceTag(std::move(*song.tag)); + queue.ModifyAtOrder(current); idle_add(IDLE_PLAYLIST); } |