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:
parent
bfbf805adc
commit
a0aaec98d0
5 changed files with 18 additions and 4 deletions
|
@ -30,7 +30,7 @@ import org.oxycblt.auxio.R
|
||||||
*
|
*
|
||||||
* Adapted from Material Files: https://github.com/zhanghai/MaterialFiles
|
* Adapted from Material Files: https://github.com/zhanghai/MaterialFiles
|
||||||
*
|
*
|
||||||
* @author Alexander Capehart (OxygenCobalt)
|
* @author Hai Zhang, Alexander Capehart (OxygenCobalt)
|
||||||
*/
|
*/
|
||||||
class ReadOnlyTextInput
|
class ReadOnlyTextInput
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
|
|
|
@ -213,12 +213,12 @@ class Task(context: Context, private val raw: Song.Raw) {
|
||||||
// Artist
|
// Artist
|
||||||
textFrames["TXXX:musicbrainz artist id"]?.let { raw.artistMusicBrainzIds = it }
|
textFrames["TXXX:musicbrainz artist id"]?.let { raw.artistMusicBrainzIds = it }
|
||||||
(textFrames["TXXX:artists"] ?: textFrames["TPE1"])?.let { raw.artistNames = 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
|
// Album artist
|
||||||
textFrames["TXXX:musicbrainz album artist id"]?.let { raw.albumArtistMusicBrainzIds = it }
|
textFrames["TXXX:musicbrainz album artist id"]?.let { raw.albumArtistMusicBrainzIds = it }
|
||||||
textFrames["TPE2"]?.let { raw.albumArtistNames = it }
|
(textFrames["TXXX:albumartists"] ?: textFrames["TPE2"])?.let { raw.albumArtistNames = it }
|
||||||
textFrames["TSO2"]?.let { raw.albumArtistSortNames = it }
|
(textFrames["TXXX:albumartists_sort"] ?: textFrames["TSO2"])?.let { raw.albumArtistSortNames = it }
|
||||||
|
|
||||||
// Genre
|
// Genre
|
||||||
textFrames["TCON"]?.let { raw.genreNames = it }
|
textFrames["TCON"]?.let { raw.genreNames = it }
|
||||||
|
|
|
@ -167,6 +167,7 @@ class QueueSongViewHolder private constructor(private val binding: ItemQueueSong
|
||||||
fun from(parent: View) =
|
fun from(parent: View) =
|
||||||
QueueSongViewHolder(ItemQueueSongBinding.inflate(parent.context.inflater))
|
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. */
|
/** A comparator that can be used with DiffUtil. */
|
||||||
val DIFF_CALLBACK = SongViewHolder.DIFF_CALLBACK
|
val DIFF_CALLBACK = SongViewHolder.DIFF_CALLBACK
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,18 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/Widget.Auxio.TextView.Header"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/spacing_large"
|
||||||
|
android:paddingEnd="@dimen/spacing_large"
|
||||||
|
android:text="@string/set_dirs_list" />
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/dirs_recycler"
|
android:id="@+id/dirs_recycler"
|
||||||
style="@style/Widget.Auxio.RecyclerView.Linear"
|
style="@style/Widget.Auxio.RecyclerView.Linear"
|
||||||
|
|
|
@ -231,6 +231,7 @@
|
||||||
<string name="set_observing_desc">Reload the music library whenever it changes (requires persistent notification)</string>
|
<string name="set_observing_desc">Reload the music library whenever it changes (requires persistent notification)</string>
|
||||||
<string name="set_dirs">Music folders</string>
|
<string name="set_dirs">Music folders</string>
|
||||||
<string name="set_dirs_desc">Manage where music should be loaded from</string>
|
<string name="set_dirs_desc">Manage where music should be loaded from</string>
|
||||||
|
<string name="set_dirs_list">Folders</string>
|
||||||
<!-- As in the mode to be used with the music folders setting -->
|
<!-- As in the mode to be used with the music folders setting -->
|
||||||
<string name="set_dirs_mode">Mode</string>
|
<string name="set_dirs_mode">Mode</string>
|
||||||
<!-- Exclude folders from music loading -->
|
<!-- Exclude folders from music loading -->
|
||||||
|
|
Loading…
Reference in a new issue