Optimize Download Queue (#1627)

* Optimize download Queue

* Lint

* Fix name of DownloadStatus file

* Re-add synchronous status fetch
This commit is contained in:
Mitchell Syer
2025-09-09 18:13:31 -04:00
committed by GitHub
parent 055c1c47f6
commit 679e2c0da9
10 changed files with 129 additions and 75 deletions

View File

@@ -48,7 +48,7 @@ object Page {
suspend fun getPageImage(
mangaId: Int,
chapterIndex: Int,
chapterId: Int,
index: Int,
format: String? = null,
progressFlow: ((StateFlow<Int>) -> Unit)? = null,
@@ -58,10 +58,8 @@ object Page {
transaction {
ChapterTable
.selectAll()
.where {
(ChapterTable.sourceOrder eq chapterIndex) and
(ChapterTable.manga eq mangaId)
}.first()
.where { ChapterTable.id eq chapterId }
.first()
}
val chapterId = chapterEntry[ChapterTable.id].value