Reflect database migration
This commit is contained in:
@@ -121,10 +121,10 @@ interface Database {
|
|||||||
@Query("SELECT thumbnailUrl FROM Song JOIN SongInPlaylist ON id = songId WHERE playlistId = :id ORDER BY position LIMIT 4")
|
@Query("SELECT thumbnailUrl FROM Song JOIN SongInPlaylist ON id = songId WHERE playlistId = :id ORDER BY position LIMIT 4")
|
||||||
fun playlistThumbnailUrls(id: Long): Flow<List<String?>>
|
fun playlistThumbnailUrls(id: Long): Flow<List<String?>>
|
||||||
|
|
||||||
// @Transaction
|
@Transaction
|
||||||
// @RewriteQueriesToDropUnusedColumns
|
@Query("SELECT * FROM Song JOIN SongArtistMap ON Song.id = SongArtistMap.songId WHERE SongArtistMap.artistId = :artistId ORDER BY Song.ROWID DESC")
|
||||||
// @Query("SELECT * FROM Info JOIN SongWithAuthors ON Info.id = SongWithAuthors.authorInfoId JOIN Song ON SongWithAuthors.songId = Song.id WHERE browseId = :artistId ORDER BY Song.ROWID DESC")
|
@RewriteQueriesToDropUnusedColumns
|
||||||
// fun artistSongs(artistId: String): Flow<List<DetailedSong>>
|
fun artistSongs(artistId: String): Flow<List<DetailedSong>>
|
||||||
|
|
||||||
@Insert(onConflict = OnConflictStrategy.ABORT)
|
@Insert(onConflict = OnConflictStrategy.ABORT)
|
||||||
fun insertQueue(queuedMediaItems: List<QueuedMediaItem>)
|
fun insertQueue(queuedMediaItems: List<QueuedMediaItem>)
|
||||||
|
|||||||
@@ -97,9 +97,8 @@ fun ArtistScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val songs by remember(browseId) {
|
val songs by remember(browseId) {
|
||||||
flowOf(emptyList<DetailedSong>())
|
Database.artistSongs(browseId)
|
||||||
// Database.artistSongs(browseId)
|
}.collectAsState(initial = emptyList(), context = Dispatchers.IO)
|
||||||
}.collectAsState(initial = emptyList<DetailedSong>(), context = Dispatchers.IO)
|
|
||||||
|
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
state = lazyListState,
|
state = lazyListState,
|
||||||
|
|||||||
@@ -458,8 +458,7 @@ fun PlayerView(
|
|||||||
)
|
)
|
||||||
|
|
||||||
BasicText(
|
BasicText(
|
||||||
text = playerState.mediaMetadata.extras?.getStringArrayList("artistNames")
|
text = playerState.mediaMetadata.artist?.toString() ?: "",
|
||||||
?.joinToString("") ?: "",
|
|
||||||
style = typography.s.semiBold.secondary,
|
style = typography.s.semiBold.secondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
|||||||
Reference in New Issue
Block a user