aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWieland Hoffmann <themineo@gmail.com>2014-09-27 18:38:23 +0200
committerMax Kellermann <max@duempel.org>2014-09-27 19:54:12 +0200
commit5525ea45a4e1765db110a8ca5abbc3ca5e66a89a (patch)
treeb228305534b8a5de0a78d6b890826f9680d90032 /src
parent3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d (diff)
downloadmpd-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 'src')
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx4
-rw-r--r--src/output/plugins/RoarOutputPlugin.cxx3
-rw-r--r--src/tag/TagId3.cxx2
-rw-r--r--src/tag/TagNames.c1
-rw-r--r--src/tag/TagType.h1
5 files changed, 11 insertions, 0 deletions
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
};