Migrate database logic to Kotlin

Room has been convereted into a KMP library in the latest stable releases and
annotation processing requires KSP which only generates kotlin classes

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta 2025-10-24 19:05:57 +08:00
parent f3ca5f659d
commit 4422b55ab4
61 changed files with 1676 additions and 1953 deletions

View file

@ -315,7 +315,7 @@ class MediaBrowserImpl(
}
private fun populateHistory(): Single<List<MediaBrowserCompat.MediaItem>> {
val history = database.streamHistoryDAO().getHistory().firstOrError()
val history = database.streamHistoryDAO().history.firstOrError()
return history.map { items ->
items.map { this.createHistoryMediaItem(it) }
}

View file

@ -215,7 +215,7 @@ class MediaBrowserPlaybackPreparer(
}
val streamId = path[0].toLong()
return database.streamHistoryDAO().getHistory()
return database.streamHistoryDAO().history
.firstOrError()
.map { items ->
val infoItems = items