LightSong: add attribute "real_uri"

The UPnP database plugin can now show relative song URIs for remote
songs.
This commit is contained in:
Max Kellermann
2014-01-20 09:18:33 +01:00
parent 5d4b450c52
commit 7471f65d95
4 changed files with 30 additions and 25 deletions

View File

@@ -223,7 +223,7 @@ map_song_detach(const LightSong &song)
{
DetachedSong detached(song);
if (detached.IsInDatabase()) {
if (detached.IsInDatabase() && !detached.HasRealURI()) {
const auto uri = song.GetURI();
detached.SetRealURI(PathTraitsUTF8::Build(music_dir_utf8.c_str(),
uri.c_str()));