music: extend non-standard artists to id3v2
Just pre-emptively add support for TXXX variations of the non-standard vorbis artist fields to the ID3v2 parser. I'd imagine the naming convention will be similar between them, so why not.
This commit is contained in:
@@ -30,7 +30,7 @@ import org.oxycblt.auxio.R
|
||||
*
|
||||
* Adapted from Material Files: https://github.com/zhanghai/MaterialFiles
|
||||
*
|
||||
* @author Alexander Capehart (OxygenCobalt)
|
||||
* @author Hai Zhang, Alexander Capehart (OxygenCobalt)
|
||||
*/
|
||||
class ReadOnlyTextInput
|
||||
@JvmOverloads
|
||||
|
||||
@@ -213,12 +213,12 @@ class Task(context: Context, private val raw: Song.Raw) {
|
||||
// Artist
|
||||
textFrames["TXXX:musicbrainz artist id"]?.let { raw.artistMusicBrainzIds = it }
|
||||
(textFrames["TXXX:artists"] ?: textFrames["TPE1"])?.let { raw.artistNames = it }
|
||||
textFrames["TSOP"]?.let { raw.artistSortNames = it }
|
||||
(textFrames["TXXX:artists_sort"] ?: textFrames["TSOP"])?.let { raw.artistSortNames = it }
|
||||
|
||||
// Album artist
|
||||
textFrames["TXXX:musicbrainz album artist id"]?.let { raw.albumArtistMusicBrainzIds = it }
|
||||
textFrames["TPE2"]?.let { raw.albumArtistNames = it }
|
||||
textFrames["TSO2"]?.let { raw.albumArtistSortNames = it }
|
||||
(textFrames["TXXX:albumartists"] ?: textFrames["TPE2"])?.let { raw.albumArtistNames = it }
|
||||
(textFrames["TXXX:albumartists_sort"] ?: textFrames["TSO2"])?.let { raw.albumArtistSortNames = it }
|
||||
|
||||
// Genre
|
||||
textFrames["TCON"]?.let { raw.genreNames = it }
|
||||
|
||||
@@ -167,6 +167,7 @@ class QueueSongViewHolder private constructor(private val binding: ItemQueueSong
|
||||
fun from(parent: View) =
|
||||
QueueSongViewHolder(ItemQueueSongBinding.inflate(parent.context.inflater))
|
||||
|
||||
// TODO: This is not good enough, I need to compare item indices as well.
|
||||
/** A comparator that can be used with DiffUtil. */
|
||||
val DIFF_CALLBACK = SongViewHolder.DIFF_CALLBACK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user