From 082f72dd20a821fcfb4d756673b2232f1c6af078 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Fri, 2 Jun 2023 21:54:04 +0200 Subject: [PATCH] Add support of TAG_MUSICBRAINZ_RELEASEGROUPID Closes #1767 --- doc/protocol.rst | 1 + src/db/plugins/ProxyDatabasePlugin.cxx | 2 ++ src/tag/Id3MusicBrainz.cxx | 2 ++ src/tag/Names.cxx | 1 + src/tag/Type.hxx | 1 + 5 files changed, 7 insertions(+) diff --git a/doc/protocol.rst b/doc/protocol.rst index f41d9488f..0dde4a05f 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -315,6 +315,7 @@ The following tags are supported by :program:`MPD`: * **musicbrainz_albumid**: the album id in the `MusicBrainz `_ database. * **musicbrainz_albumartistid**: the album artist id in the `MusicBrainz `_ database. * **musicbrainz_trackid**: the track id in the `MusicBrainz `_ database. +* **musicbrainz_releasegroupid**: the release group id in the `MusicBrainz `_ database. * **musicbrainz_releasetrackid**: the release track id in the `MusicBrainz `_ database. * **musicbrainz_workid**: the work id in the `MusicBrainz `_ database. diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx index 4efd97ec9..f46c95702 100644 --- a/src/db/plugins/ProxyDatabasePlugin.cxx +++ b/src/db/plugins/ProxyDatabasePlugin.cxx @@ -182,6 +182,8 @@ static constexpr struct { #endif #if LIBMPDCLIENT_CHECK_VERSION(2,21,0) { TAG_MOOD, MPD_TAG_MOOD }, + { TAG_MUSICBRAINZ_RELEASEGROUPID, + MPD_TAG_MUSICBRAINZ_RELEASEGROUPID }, #endif { TAG_NUM_OF_ITEM_TYPES, MPD_TAG_COUNT } }; diff --git a/src/tag/Id3MusicBrainz.cxx b/src/tag/Id3MusicBrainz.cxx index ec96449a5..5b7f2d885 100644 --- a/src/tag/Id3MusicBrainz.cxx +++ b/src/tag/Id3MusicBrainz.cxx @@ -15,5 +15,7 @@ const struct tag_table musicbrainz_txxx_tags[] = { { "MusicBrainz Release Track Id", TAG_MUSICBRAINZ_RELEASETRACKID }, { "MusicBrainz Work Id", TAG_MUSICBRAINZ_WORKID }, + { "MusicBrainz Release Group Id", + TAG_MUSICBRAINZ_RELEASEGROUPID }, { nullptr, TAG_NUM_OF_ITEM_TYPES } }; diff --git a/src/tag/Names.cxx b/src/tag/Names.cxx index f6e1fbcaa..7ed9f210c 100644 --- a/src/tag/Names.cxx +++ b/src/tag/Names.cxx @@ -42,6 +42,7 @@ static constexpr struct tag_table tag_item_names_init[] = { {"MUSICBRAINZ_TRACKID", TAG_MUSICBRAINZ_TRACKID}, {"MUSICBRAINZ_RELEASETRACKID", TAG_MUSICBRAINZ_RELEASETRACKID}, {"MUSICBRAINZ_WORKID", TAG_MUSICBRAINZ_WORKID}, + {"MUSICBRAINZ_RELEASEGROUPID", TAG_MUSICBRAINZ_RELEASEGROUPID}, }; /** diff --git a/src/tag/Type.hxx b/src/tag/Type.hxx index 9ec43d8bd..d9dcdd470 100644 --- a/src/tag/Type.hxx +++ b/src/tag/Type.hxx @@ -43,6 +43,7 @@ enum TagType : uint8_t { TAG_MUSICBRAINZ_TRACKID, TAG_MUSICBRAINZ_RELEASETRACKID, TAG_MUSICBRAINZ_WORKID, + TAG_MUSICBRAINZ_RELEASEGROUPID, TAG_NUM_OF_ITEM_TYPES };