decoder/sidplay: Fix empty album names by using the SID name field
SID files are generally collections of tunes, so a SID name field makes sense as an MPD album. The SID tune information list (STIL) has name and title fields for individual tunes, when such are known, but MPD is currently not using the STIL.
This commit is contained in:

committed by
Max Kellermann

parent
9bcd02d178
commit
9654a33218
@@ -510,16 +510,18 @@ static void
|
||||
ScanSidTuneInfo(const SidTuneInfo &info, unsigned track, unsigned n_tracks,
|
||||
TagHandler &handler) noexcept
|
||||
{
|
||||
/* title */
|
||||
const auto title = GetInfoString(info, 0);
|
||||
/* album */
|
||||
const auto album = GetInfoString(info, 0);
|
||||
|
||||
handler.OnTag(TAG_ALBUM, album.c_str());
|
||||
|
||||
if (n_tracks > 1) {
|
||||
const auto tag_title =
|
||||
StringFormat<1024>("%s (%u/%u)",
|
||||
title.c_str(), track, n_tracks);
|
||||
album.c_str(), track, n_tracks);
|
||||
handler.OnTag(TAG_TITLE, tag_title.c_str());
|
||||
} else
|
||||
handler.OnTag(TAG_TITLE, title.c_str());
|
||||
handler.OnTag(TAG_TITLE, album.c_str());
|
||||
|
||||
/* artist */
|
||||
const auto artist = GetInfoString(info, 1);
|
||||
|
Reference in New Issue
Block a user