aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/PlaylistSong.cxx20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx
index b204628aa..03dfd4174 100644
--- a/src/PlaylistSong.cxx
+++ b/src/PlaylistSong.cxx
@@ -51,30 +51,14 @@ merge_song_metadata(DetachedSong &dest, const DetachedSong &base,
static DetachedSong *
apply_song_metadata(DetachedSong *dest, const DetachedSong &src)
{
- DetachedSong *tmp;
-
assert(dest != nullptr);
if (!src.GetTag().IsDefined() &&
src.GetStartMS() == 0 && src.GetEndMS() == 0)
return dest;
- if (dest->IsInDatabase()) {
- const auto path_fs = map_song_fs(*dest);
- if (path_fs.IsNull())
- return dest;
-
- std::string path_utf8 = path_fs.ToUTF8();
- if (path_utf8.empty())
- path_utf8 = path_fs.c_str();
-
- tmp = new DetachedSong(std::move(path_utf8));
-
- merge_song_metadata(*tmp, *dest, src);
- } else {
- tmp = new DetachedSong(dest->GetURI());
- merge_song_metadata(*tmp, *dest, src);
- }
+ DetachedSong *tmp = new DetachedSong(dest->GetURI());
+ merge_song_metadata(*tmp, *dest, src);
if (dest->GetTag().IsDefined() && dest->GetTag().time > 0 &&
src.GetStartMS() > 0 && src.GetEndMS() == 0 &&