diff options
author | Wieland Hoffmann <themineo@gmail.com> | 2014-09-27 18:38:23 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-27 19:54:12 +0200 |
commit | 5525ea45a4e1765db110a8ca5abbc3ca5e66a89a (patch) | |
tree | b228305534b8a5de0a78d6b890826f9680d90032 | |
parent | 3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d (diff) | |
download | mpd-5525ea45a4e1765db110a8ca5abbc3ca5e66a89a.tar.gz mpd-5525ea45a4e1765db110a8ca5abbc3ca5e66a89a.tar.xz mpd-5525ea45a4e1765db110a8ca5abbc3ca5e66a89a.zip |
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
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | doc/mpd.conf.5 | 3 | ||||
-rw-r--r-- | src/db/plugins/ProxyDatabasePlugin.cxx | 4 | ||||
-rw-r--r-- | src/output/plugins/RoarOutputPlugin.cxx | 3 | ||||
-rw-r--r-- | src/tag/TagId3.cxx | 2 | ||||
-rw-r--r-- | src/tag/TagNames.c | 1 | ||||
-rw-r--r-- | src/tag/TagType.h | 1 |
7 files changed, 14 insertions, 1 deletions
@@ -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 diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index 6e23f7cce..5ff8608bb 100644 --- a/doc/mpd.conf.5 +++ b/doc/mpd.conf.5 @@ -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". diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx index 2bd04e3ad..fba72210d 100644 --- a/src/db/plugins/ProxyDatabasePlugin.cxx +++ b/src/db/plugins/ProxyDatabasePlugin.cxx @@ -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 } }; diff --git a/src/output/plugins/RoarOutputPlugin.cxx b/src/output/plugins/RoarOutputPlugin.cxx index 04836cc46..508e147f0 100644 --- a/src/output/plugins/RoarOutputPlugin.cxx +++ b/src/output/plugins/RoarOutputPlugin.cxx @@ -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; diff --git a/src/tag/TagId3.cxx b/src/tag/TagId3.cxx index cbc293ff6..c179d6996 100644 --- a/src/tag/TagId3.cxx +++ b/src/tag/TagId3.cxx @@ -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 } }; diff --git a/src/tag/TagNames.c b/src/tag/TagNames.c index 477ed5f21..fb4f5bbc2 100644 --- a/src/tag/TagNames.c +++ b/src/tag/TagNames.c @@ -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", }; diff --git a/src/tag/TagType.h b/src/tag/TagType.h index 098198445..5fd07d2e8 100644 --- a/src/tag/TagType.h +++ b/src/tag/TagType.h @@ -54,6 +54,7 @@ enum TagType TAG_MUSICBRAINZ_ALBUMID, TAG_MUSICBRAINZ_ALBUMARTISTID, TAG_MUSICBRAINZ_TRACKID, + TAG_MUSICBRAINZ_RELEASETRACKID, TAG_NUM_OF_ITEM_TYPES }; |