music: recognize spaced artist tags

Recognize artists sort, albumartists sort, and album artists tags.

These are written by mediafile, so they are probably also written by
other software.
This commit is contained in:
Alexander Capehart 2023-06-24 09:04:21 -06:00
parent 19e8536323
commit ed7b4e1410
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 21 additions and 12 deletions

View file

@ -6,6 +6,9 @@
- Updated to Android 14
- Added option to re-enable old album cover cropping behavior
#### What's Improved
- `album artists` and `(album)artists sort` are now recognized
#### What's Fixed
- Fixed an issue where the queue sheet would not collapse when scrolling
the song list in some cases

View file

@ -149,18 +149,22 @@ private class TagWorkerImpl(
// Artist
textFrames["TXXX:musicbrainz artist id"]?.let { rawSong.artistMusicBrainzIds = it }
(textFrames["TXXX:artists"] ?: textFrames["TPE1"])?.let { rawSong.artistNames = it }
(textFrames["TXXX:artistssort"] ?: textFrames["TXXX:artists_sort"] ?: textFrames["TSOP"])
(textFrames["TXXX:artistssort"]
?: textFrames["TXXX:artists_sort"] ?: textFrames["TXXX:artists sort"]
?: textFrames["TSOP"])
?.let { rawSong.artistSortNames = it }
// Album artist
textFrames["TXXX:musicbrainz album artist id"]?.let {
rawSong.albumArtistMusicBrainzIds = it
}
(textFrames["TXXX:albumartists"] ?: textFrames["TPE2"])?.let {
rawSong.albumArtistNames = it
}
(textFrames["TXXX:albumartists"]
?: textFrames["TXXX:album_artists"] ?: textFrames["TXXX:album artists"]
?: textFrames["TPE2"])
?.let { rawSong.albumArtistNames = it }
(textFrames["TXXX:albumartistssort"]
?: textFrames["TXXX:albumartists_sort"] ?: textFrames["TXXX:albumartistsort"]
?: textFrames["TXXX:albumartists_sort"] ?: textFrames["TXXX:albumartists sort"]
?: textFrames["TXXX:albumartistsort"]
// This is a non-standard iTunes extension
?: textFrames["TSO2"])
?.let { rawSong.albumArtistSortNames = it }
@ -261,17 +265,19 @@ private class TagWorkerImpl(
// Artist
comments["musicbrainz_artistid"]?.let { rawSong.artistMusicBrainzIds = it }
(comments["artists"] ?: comments["artist"])?.let { rawSong.artistNames = it }
(comments["artistssort"] ?: comments["artists_sort"] ?: comments["artistsort"])?.let {
rawSong.artistSortNames = it
}
(comments["artistssort"]
?: comments["artists_sort"] ?: comments["artists sort"] ?: comments["artistsort"])
?.let { rawSong.artistSortNames = it }
// Album artist
comments["musicbrainz_albumartistid"]?.let { rawSong.albumArtistMusicBrainzIds = it }
(comments["albumartists"] ?: comments["album_artists"] ?: comments["albumartist"])?.let {
rawSong.albumArtistNames = it
}
(comments["albumartists"]
?: comments["album_artists"] ?: comments["album artists"]
?: comments["albumartist"])
?.let { rawSong.albumArtistNames = it }
(comments["albumartistssort"]
?: comments["albumartists_sort"] ?: comments["albumartistsort"])
?: comments["albumartists_sort"] ?: comments["albumartists sort"]
?: comments["albumartistsort"])
?.let { rawSong.albumArtistSortNames = it }
// Genre