mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Order chapters to download by manga and source order (#697)
Chapters were added to the queue by database index order. In case a chapters of different mangas got added to the queue, downloads got mingled instead of being group inserted per manga. Also sort manga chapters by source order, to make sure, that, in case chapters of a manga are, for some reason, not in the correct order in the database, they will still get downloaded in the order of the source.
This commit is contained in:
@@ -246,6 +246,8 @@ object DownloadManager {
|
||||
val chapters = transaction {
|
||||
(ChapterTable innerJoin MangaTable)
|
||||
.select { ChapterTable.id inList input.chapterIds }
|
||||
.orderBy(ChapterTable.manga)
|
||||
.orderBy(ChapterTable.sourceOrder)
|
||||
.toList()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user