diff options
author | Max Kellermann <max@duempel.org> | 2014-01-20 22:43:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-20 23:31:08 +0100 |
commit | 414d5b648ccc6147d1c6f114b2d48fa557033ca0 (patch) | |
tree | cac369c0d4c9bd18b42c690ca60ddc9148872cba | |
parent | a237e7f860bb4705823077e90b2ecc599746e46c (diff) | |
download | mpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.tar.gz mpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.tar.xz mpd-414d5b648ccc6147d1c6f114b2d48fa557033ca0.zip |
PlaylistSong: don't map relative URI to absolute path
This didn't make sense.
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistSong.cxx | 20 |
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 && |