db/simple/Song: Export() merges tags with "target"

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1048
This commit is contained in:
Max Kellermann
2021-01-21 13:14:27 +01:00
parent 3a7c9c7c84
commit 1afa33c3c7
3 changed files with 80 additions and 7 deletions

View File

@@ -233,12 +233,12 @@ SimpleDatabase::GetSong(std::string_view uri) const
"No such song");
const Song *song = r.directory->FindSong(r.rest);
protect.unlock();
if (song == nullptr)
throw DatabaseError(DatabaseErrorCode::NOT_FOUND,
"No such song");
exported_song.Construct(song->Export());
protect.unlock();
#ifndef NDEBUG
++borrowed_song_count;