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 ## dev
#### What's Improved
- Tags formatted as `artistssort` or `albumartistssort` are now recognized by Auxio
#### What's Fixed #### What's Fixed
- Disc number is no longer mis-aligned when no subtitle is present - Disc number is no longer mis-aligned when no subtitle is present

View file

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