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:
parent
9bcd02d178
commit
9654a33218
1
NEWS
1
NEWS
@ -11,6 +11,7 @@ ver 0.22 (not yet released)
|
||||
- iso9660: support seeking
|
||||
* decoder
|
||||
- sidplay: add option "default_genre"
|
||||
- sidplay: map SID name field to "Album" tag
|
||||
* filter
|
||||
- ffmpeg: new plugin based on FFmpeg's libavfilter library
|
||||
- hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user