Add MusicBrainz' Release Track Id tag

The Release Track Id uniquely identifies a recording on a release - that
is, even if a recording appears twice on a release (meaning that the
combination of recording and release id are not enough to figure out
which one it is), the release track id will allow differentiating the two.

The tag names are taken from
https://musicbrainz.org/doc/MusicBrainz_Picard/Tags/Mapping
This commit is contained in:
Wieland Hoffmann 2014-09-27 18:38:23 +02:00 committed by Max Kellermann
parent 3120958a17
commit 5525ea45a4
7 changed files with 14 additions and 1 deletions

1
NEWS
View File

@ -67,6 +67,7 @@ ver 0.19 (not yet released)
* configuration
- allow playlist directory without music directory
- use XDG to auto-detect "music_directory" and "db_file"
* add tag "MUSICBRAINZ_RELEASETRACKID"
* new resampler option using libsoxr
* ARM NEON optimizations
* install systemd unit for socket activation

View File

@ -180,7 +180,8 @@ clients. Note that you must recreate (not update) your database for changes to
this parameter to take effect. Possible values are artist, album, title,
track, name, genre, date, composer, performer, comment, disc,
musicbrainz_artistid, musicbrainz_albumid, musicbrainz_albumartistid,
musicbrainz_trackid. Multiple tags may be specified as a comma separated list.
musicbrainz_releasetrackid, musicbrainz_trackid. Multiple tags may be specified
as a comma separated list.
An example value is "artist,album,title,track". The special value "none" may
be used alone to disable all metadata. The default is to use all known tag
types except for comments and those starting with "musicbrainz".

View File

@ -166,6 +166,10 @@ static constexpr struct {
{ TAG_MUSICBRAINZ_ALBUMARTISTID,
MPD_TAG_MUSICBRAINZ_ALBUMARTISTID },
{ TAG_MUSICBRAINZ_TRACKID, MPD_TAG_MUSICBRAINZ_TRACKID },
#if LIBMPDCLIENT_CHECK_VERSION(2,10,0)
{ TAG_MUSICBRAINZ_RELEASETRACKID,
MPD_TAG_MUSICBRAINZ_RELEASETRACKID },
#endif
{ TAG_NUM_OF_ITEM_TYPES, MPD_TAG_COUNT }
};

View File

@ -349,6 +349,9 @@ roar_tag_convert(TagType type, bool *is_uuid)
case TAG_MUSICBRAINZ_TRACKID:
*is_uuid = true;
return "HASH";
case TAG_MUSICBRAINZ_RELEASETRACKID:
*is_uuid = true;
return "HASH";
default:
return nullptr;

View File

@ -259,6 +259,8 @@ tag_id3_parse_txxx_name(const char *name)
{ "MusicBrainz Album Artist Id",
TAG_MUSICBRAINZ_ALBUMARTISTID },
{ "MusicBrainz Track Id", TAG_MUSICBRAINZ_TRACKID },
{ "MusicBrainz Release Track Id",
TAG_MUSICBRAINZ_RELEASETRACKID },
{ nullptr, TAG_NUM_OF_ITEM_TYPES }
};

View File

@ -41,4 +41,5 @@ const char *const tag_item_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_MUSICBRAINZ_ALBUMID] = "MUSICBRAINZ_ALBUMID",
[TAG_MUSICBRAINZ_ALBUMARTISTID] = "MUSICBRAINZ_ALBUMARTISTID",
[TAG_MUSICBRAINZ_TRACKID] = "MUSICBRAINZ_TRACKID",
[TAG_MUSICBRAINZ_RELEASETRACKID] = "MUSICBRAINZ_RELEASETRACKID",
};

View File

@ -54,6 +54,7 @@ enum TagType
TAG_MUSICBRAINZ_ALBUMID,
TAG_MUSICBRAINZ_ALBUMARTISTID,
TAG_MUSICBRAINZ_TRACKID,
TAG_MUSICBRAINZ_RELEASETRACKID,
TAG_NUM_OF_ITEM_TYPES
};