music: use plural vorbis artist tags

Use plural variants of vorbis artist/album artist tags.

Some people add these tags to signal the artist makeup of a song
when a player supports multiple artists while still allowing less
sophisticated players to operate with single-artist tags.
This commit is contained in:
Alexander Capehart 2022-09-24 09:13:15 -06:00
parent b58fce9414
commit c3de8fe4fd
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 4 additions and 6 deletions

View file

@ -107,8 +107,6 @@ sealed class Music : Item {
* Please don't try to do anything interesting with this and just assume it's a black box
* that can only be compared, serialized, and deserialized.
*
* TODO: MusicBrainz tags
*
* @author OxygenCobalt
*/
@Parcelize

View file

@ -303,13 +303,13 @@ class Task(context: Context, private val raw: Song.Raw) {
// Artist
tags["MUSICBRAINZ_ARTISTID"]?.let { raw.artistMusicBrainzIds = it }
tags["ARTIST"]?.let { raw.artistNames = it }
tags["ARTISTSORT"]?.let { raw.artistSortNames = it }
(tags["ARTISTS"] ?: tags["ARTIST"])?.let { raw.artistNames = it }
(tags["ARTISTS_SORT"] ?: tags["ARTISTSORT"])?.let { raw.artistSortNames = it }
// Album artist
tags["MUSICBRAINZ_ALBUMARTISTID"]?.let { raw.albumArtistMusicBrainzIds = it }
tags["ALBUMARTIST"]?.let { raw.albumArtistNames = it }
tags["ALBUMARTISTSORT"]?.let { raw.albumArtistSortNames = it }
(tags["ALBUMARTISTS"] ?: tags["ALBUMARTIST"])?.let { raw.albumArtistNames = it }
(tags["ALBUMARTISTS_SORT"] ?: tags["ALBUMARTISTSORT"])?.let { raw.albumArtistSortNames = it }
// Genre
tags["GENRE"]?.let { raw.genreNames = it }