music: use indices in playlist db

Use indices in the playlist database, which should improve perofrmance
a little.
This commit is contained in:
Alexander Capehart 2023-05-21 13:38:24 -06:00
parent b764796500
commit 877d380fa0
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
3 changed files with 6 additions and 5 deletions

View file

@ -57,6 +57,6 @@ data class RawPlaylist(
@Entity
data class PlaylistSongCrossRef(
@PrimaryKey(autoGenerate = true) val id: Long = 0,
val playlistUid: Music.UID,
val songUid: Music.UID
@ColumnInfo(index = true) val playlistUid: Music.UID,
@ColumnInfo(index = true) val songUid: Music.UID
)

View file

@ -126,6 +126,7 @@ interface QueueDao {
suspend fun insertMapping(mapping: List<QueueMappingItem>)
}
// TODO: Figure out how to get RepeatMode to map to an int instead of a string
@Entity(tableName = PlaybackState.TABLE_NAME)
data class PlaybackState(
@PrimaryKey val id: Int,

View file

@ -3,9 +3,9 @@
xmlns:aapt="http://schemas.android.com/aapt">
<!--
Yes, this whole file is all 30 frames of Spotify's equalizer animation
merged with the material equalizer icon, with each vector inlined using
aapt:attr so that it does not clutter the drawable folder.
Yes, this whole file is the material equalizer icon influenced by Spotify's
equalizer animation with each vector inlined using aapt:attr so that it does
not clutter the drawable folder.
-->
<!-- Frame 1 -->