aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-12 19:41:04 +0200
committerMax Kellermann <max@duempel.org>2014-07-12 19:41:04 +0200
commit74e95e88d8507b3e133a634abc12b5efeceba866 (patch)
treea99327567707a054b60eb278ec311a9718adffec /src/playlist
parent80d9baa9e869624264efa973ec2389825d9ce9f7 (diff)
downloadmpd-74e95e88d8507b3e133a634abc12b5efeceba866.tar.gz
mpd-74e95e88d8507b3e133a634abc12b5efeceba866.tar.xz
mpd-74e95e88d8507b3e133a634abc12b5efeceba866.zip
PlaylistSong: always merge tags and LastModified
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/PlaylistSong.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/playlist/PlaylistSong.cxx b/src/playlist/PlaylistSong.cxx
index d5adbdc14..3603c1add 100644
--- a/src/playlist/PlaylistSong.cxx
+++ b/src/playlist/PlaylistSong.cxx
@@ -33,7 +33,7 @@
static void
merge_song_metadata(DetachedSong &add, const DetachedSong &base)
{
- {
+ if (base.GetTag().IsDefined()) {
TagBuilder builder(add.GetTag());
builder.Complement(base.GetTag());
add.SetTag(builder.Commit());
@@ -42,16 +42,6 @@ merge_song_metadata(DetachedSong &add, const DetachedSong &base)
add.SetLastModified(base.GetLastModified());
}
-static void
-apply_song_metadata(DetachedSong &dest, const DetachedSong &src)
-{
- if (!src.GetTag().IsDefined() &&
- src.GetStartMS() == 0 && src.GetEndMS() == 0)
- return;
-
- merge_song_metadata(dest, src);
-}
-
static bool
playlist_check_load_song(DetachedSong &song, const SongLoader &loader)
{
@@ -63,7 +53,7 @@ playlist_check_load_song(DetachedSong &song, const SongLoader &loader)
if (!song.HasRealURI() && tmp->HasRealURI())
song.SetRealURI(tmp->GetRealURI());
- apply_song_metadata(song, *tmp);
+ merge_song_metadata(song, *tmp);
delete tmp;
return true;
}