From 414d5b648ccc6147d1c6f114b2d48fa557033ca0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Jan 2014 22:43:08 +0100 Subject: PlaylistSong: don't map relative URI to absolute path This didn't make sense. --- src/PlaylistSong.cxx | 20 ++------------------ 1 file 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 && -- cgit v1.2.3