mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
Fix first page not being detected correctly (#253)
* fix first page not being recognized correctly * fix first page not being recognized correctly
This commit is contained in:
@@ -162,9 +162,12 @@ object Chapter {
|
||||
}.first()
|
||||
}
|
||||
|
||||
val isReallyDownloaded =
|
||||
chapterEntry[ChapterTable.isDownloaded] && firstPageExists(mangaId, chapterEntry[ChapterTable.id].value)
|
||||
return if (!isReallyDownloaded) {
|
||||
val isPartiallyDownloaded =
|
||||
!(chapterEntry[ChapterTable.isDownloaded] && firstPageExists(mangaId, chapterEntry[ChapterTable.id].value))
|
||||
|
||||
return if (isPartiallyDownloaded) {
|
||||
|
||||
// chapter files may have been deleted
|
||||
transaction {
|
||||
ChapterTable.update({ (ChapterTable.sourceOrder eq chapterIndex) and (ChapterTable.manga eq mangaId) }) {
|
||||
it[isDownloaded] = false
|
||||
@@ -243,7 +246,7 @@ object Chapter {
|
||||
|
||||
return ImageResponse.findFileNameStartingWith(
|
||||
chapterDir,
|
||||
getPageName(0)
|
||||
getPageName(1)
|
||||
) != null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user