music: recognize (album)artistssort tags

Recognize albumartistssort and artistssort tags, which are apparently
written by beets.
This commit is contained in:
Alexander Capehart 2023-06-07 15:15:01 -06:00
parent 96874b3324
commit 927c4a056e
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 13 additions and 10 deletions

View file

@ -2,6 +2,9 @@
## dev
#### What's Improved
- Tags formatted as `artistssort` or `albumartistssort` are now recognized by Auxio
#### What's Fixed
- Disc number is no longer mis-aligned when no subtitle is present

View file

@ -146,9 +146,8 @@ private class TagWorkerImpl(
// Artist
textFrames["TXXX:musicbrainz artist id"]?.let { rawSong.artistMusicBrainzIds = it }
(textFrames["TXXX:artists"] ?: textFrames["TPE1"])?.let { rawSong.artistNames = it }
(textFrames["TXXX:artists_sort"] ?: textFrames["TSOP"])?.let {
rawSong.artistSortNames = it
}
(textFrames["TXXX:artistssort"] ?: textFrames["TXXX:artists_sort"] ?: textFrames["TSOP"])
?.let { rawSong.artistSortNames = it }
// Album artist
textFrames["TXXX:musicbrainz album artist id"]?.let {
@ -157,9 +156,9 @@ private class TagWorkerImpl(
(textFrames["TXXX:albumartists"] ?: textFrames["TPE2"])?.let {
rawSong.albumArtistNames = it
}
(textFrames["TXXX:albumartists_sort"] ?: textFrames["TSO2"])?.let {
rawSong.albumArtistSortNames = it
}
(textFrames["TXXX:albumartistssort"] ?: textFrames["TXXX:albumartists_sort"]
?: textFrames["TSO2"])
?.let { rawSong.albumArtistSortNames = it }
// Genre
textFrames["TCON"]?.let { rawSong.genreNames = it }
@ -249,14 +248,15 @@ private class TagWorkerImpl(
// Artist
comments["musicbrainz_artistid"]?.let { rawSong.artistMusicBrainzIds = it }
(comments["artists"] ?: comments["artist"])?.let { rawSong.artistNames = it }
(comments["artists_sort"] ?: comments["artistsort"])?.let { rawSong.artistSortNames = it }
(comments["artistssort"] ?: comments["artists_sort"] ?: comments["artistsort"] )?.let {
rawSong.artistSortNames = it
}
// Album artist
comments["musicbrainz_albumartistid"]?.let { rawSong.albumArtistMusicBrainzIds = it }
(comments["albumartists"] ?: comments["albumartist"])?.let { rawSong.albumArtistNames = it }
(comments["albumartists_sort"] ?: comments["albumartistsort"])?.let {
rawSong.albumArtistSortNames = it
}
(comments["albumartistssort"] ?: comments["albumartists_sort"] ?: comments["albumartistsort"])
?.let { rawSong.albumArtistSortNames = it }
// Genre
comments["genre"]?.let { rawSong.genreNames = it }