From 7dea5db5dfcdb8febefb4e217fc2ae2231f776db Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Wed, 1 Jan 2020 21:35:43 +0100 Subject: [PATCH] playlist/PlaylistSong: also copy start and end time in merge_song_metadata This is needed to correctly load playlist entries that reference a song in a cuesheet that is treated as a folder. --- src/playlist/PlaylistSong.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/playlist/PlaylistSong.cxx b/src/playlist/PlaylistSong.cxx index 9d759a934..2629eddd2 100644 --- a/src/playlist/PlaylistSong.cxx +++ b/src/playlist/PlaylistSong.cxx @@ -40,6 +40,13 @@ merge_song_metadata(DetachedSong &add, const DetachedSong &base) noexcept } add.SetLastModified(base.GetLastModified()); + + if (add.GetStartTime().IsZero()) { + add.SetStartTime(base.GetStartTime()); + } + if (add.GetEndTime().IsZero()) { + add.SetEndTime(base.GetEndTime()); + } } static bool