diff --git a/mpris.c b/mpris.c index 516cd6d..3262a60 100644 --- a/mpris.c +++ b/mpris.c @@ -360,6 +360,25 @@ static GVariant *create_metadata(UserData *ud) add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/Album", "xesam:album"); add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/Genre", "xesam:genre"); + /* Musicbrainz metadata mappings + (https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html) */ + + // IDv3 metadata format + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Artist Id", "mb:artistId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Track Id", "mb:recordingId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Album Artist Id", "mb:releaseArtistId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Album Id", "mb:releaseId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Release Track Id", "mb:trackId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MusicBrainz Work Id", "mb:workId"); + + // Vorbis & APEv2 metadata format + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_ARTISTID", "mb:artistId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_TRACKID", "mb:recordingId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_ALBUMARTISTID", "mb:releaseArtistId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_ALBUMID", "mb:releaseId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_RELEASETRACKID", "mb:trackId"); + add_metadata_item_string(ud->mpv, &dict, "metadata/by-key/MUSICBRAINZ_WORKID", "mb:workId"); + add_metadata_item_string_list(ud->mpv, &dict, "metadata/by-key/uploader", "xesam:artist"); add_metadata_item_string_list(ud->mpv, &dict, "metadata/by-key/Artist", "xesam:artist"); add_metadata_item_string_list(ud->mpv, &dict, "metadata/by-key/Album_Artist", "xesam:albumArtist");