song/DetachedSong: copy the AudioFormat from LightSong

Enables the "Format" row in "playlistinfo" responses.

https://github.com/MusicPlayerDaemon/MPD/issues/1094
This commit is contained in:
Max Kellermann
2021-02-18 21:59:47 +01:00
parent 81d0c04ed4
commit c729f16dcd
10 changed files with 40 additions and 18 deletions

View File

@@ -47,6 +47,9 @@ merge_song_metadata(DetachedSong &add, const DetachedSong &base) noexcept
if (add.GetEndTime().IsZero()) {
add.SetEndTime(base.GetEndTime());
}
if (!add.GetAudioFormat().IsDefined())
add.SetAudioFormat(base.GetAudioFormat());
}
static bool