diff options
Diffstat (limited to 'src/inputPlugins/_flac_common.c')
-rw-r--r-- | src/inputPlugins/_flac_common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c index f6a470ed2..79a3c38f2 100644 --- a/src/inputPlugins/_flac_common.c +++ b/src/inputPlugins/_flac_common.c @@ -106,14 +106,19 @@ static void flacParseReplayGain(const FLAC__StreamMetadata *block, /* tracknumber is used in VCs, MPD uses "track" ..., all the other * tag names match */ static const char * VORBIS_COMMENT_TRACK_KEY = "tracknumber"; +static const char * VORBIS_COMMENT_DISC_KEY = "discnumber"; static unsigned int commentMatchesAddToTag( const FLAC__StreamMetadata_VorbisComment_Entry * entry, unsigned int itemType, MpdTag ** tag) { - const char * str = (itemType == TAG_ITEM_TRACK) ? - VORBIS_COMMENT_TRACK_KEY : mpdTagItemKeys[itemType]; + const char * str; + switch (itemType) { + case TAG_ITEM_TRACK: str = VORBIS_COMMENT_TRACK_KEY; break; + case TAG_ITEM_DISC: str = VORBIS_COMMENT_DISC_KEY; break; + default: str = mpdTagItemKeys[itemType]; + } size_t slen = strlen(str); int vlen = entry->length - slen - 1; |