From 42959982a986b5eab4c0d6d8da41a283bb15a8a7 Mon Sep 17 00:00:00 2001 From: loujine Date: Sat, 30 Dec 2017 19:05:21 +0000 Subject: [PATCH] Add basic support for MUSICBRAINZ_WORKID tag --- doc/include/tags.xml | 9 +++++++++ src/output/plugins/RoarOutputPlugin.cxx | 1 + src/tag/Id3MusicBrainz.cxx | 1 + src/tag/Names.c | 1 + src/tag/Type.h | 1 + 5 files changed, 13 insertions(+) diff --git a/doc/include/tags.xml b/doc/include/tags.xml index b3554efb9..88a9e358e 100644 --- a/doc/include/tags.xml +++ b/doc/include/tags.xml @@ -153,4 +153,13 @@ database. + + + + musicbrainz_workid: the work id in the + MusicBrainz + database. + + diff --git a/src/output/plugins/RoarOutputPlugin.cxx b/src/output/plugins/RoarOutputPlugin.cxx index 6be6f2471..f6b1d88f5 100644 --- a/src/output/plugins/RoarOutputPlugin.cxx +++ b/src/output/plugins/RoarOutputPlugin.cxx @@ -280,6 +280,7 @@ roar_tag_convert(TagType type, bool *is_uuid) case TAG_MUSICBRAINZ_ALBUMARTISTID: case TAG_MUSICBRAINZ_TRACKID: case TAG_MUSICBRAINZ_RELEASETRACKID: + case TAG_MUSICBRAINZ_WORKID: *is_uuid = true; return "HASH"; diff --git a/src/tag/Id3MusicBrainz.cxx b/src/tag/Id3MusicBrainz.cxx index b1f747cf2..261ff4aca 100644 --- a/src/tag/Id3MusicBrainz.cxx +++ b/src/tag/Id3MusicBrainz.cxx @@ -30,5 +30,6 @@ const struct tag_table musicbrainz_txxx_tags[] = { { "MusicBrainz Track Id", TAG_MUSICBRAINZ_TRACKID }, { "MusicBrainz Release Track Id", TAG_MUSICBRAINZ_RELEASETRACKID }, + { "MusicBrainz Work Id", TAG_MUSICBRAINZ_WORKID }, { nullptr, TAG_NUM_OF_ITEM_TYPES } }; diff --git a/src/tag/Names.c b/src/tag/Names.c index 7f99877c4..5657e5f80 100644 --- a/src/tag/Names.c +++ b/src/tag/Names.c @@ -44,4 +44,5 @@ const char *const tag_item_names[TAG_NUM_OF_ITEM_TYPES] = { [TAG_MUSICBRAINZ_ALBUMARTISTID] = "MUSICBRAINZ_ALBUMARTISTID", [TAG_MUSICBRAINZ_TRACKID] = "MUSICBRAINZ_TRACKID", [TAG_MUSICBRAINZ_RELEASETRACKID] = "MUSICBRAINZ_RELEASETRACKID", + [TAG_MUSICBRAINZ_WORKID] = "MUSICBRAINZ_WORKID", }; diff --git a/src/tag/Type.h b/src/tag/Type.h index 4aeb24dff..8e9d603b5 100644 --- a/src/tag/Type.h +++ b/src/tag/Type.h @@ -57,6 +57,7 @@ enum TagType TAG_MUSICBRAINZ_ALBUMARTISTID, TAG_MUSICBRAINZ_TRACKID, TAG_MUSICBRAINZ_RELEASETRACKID, + TAG_MUSICBRAINZ_WORKID, TAG_NUM_OF_ITEM_TYPES };