aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-20 22:43:08 +0100
committerMax Kellermann <max@duempel.org>2014-01-20 23:31:08 +0100
commit414d5b648ccc6147d1c6f114b2d48fa557033ca0 (patch)
treecac369c0d4c9bd18b42c690ca60ddc9148872cba
parenta237e7f860bb4705823077e90b2ecc599746e46c (diff)
downloadmpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.tar.gz
mpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.tar.xz
mpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.zip
PlaylistSong: don't map relative URI to absolute path
This didn't make sense.
-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 &&