mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-23 21:12:37 +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()
|
}.first()
|
||||||
}
|
}
|
||||||
|
|
||||||
val isReallyDownloaded =
|
val isPartiallyDownloaded =
|
||||||
chapterEntry[ChapterTable.isDownloaded] && firstPageExists(mangaId, chapterEntry[ChapterTable.id].value)
|
!(chapterEntry[ChapterTable.isDownloaded] && firstPageExists(mangaId, chapterEntry[ChapterTable.id].value))
|
||||||
return if (!isReallyDownloaded) {
|
|
||||||
|
return if (isPartiallyDownloaded) {
|
||||||
|
|
||||||
|
// chapter files may have been deleted
|
||||||
transaction {
|
transaction {
|
||||||
ChapterTable.update({ (ChapterTable.sourceOrder eq chapterIndex) and (ChapterTable.manga eq mangaId) }) {
|
ChapterTable.update({ (ChapterTable.sourceOrder eq chapterIndex) and (ChapterTable.manga eq mangaId) }) {
|
||||||
it[isDownloaded] = false
|
it[isDownloaded] = false
|
||||||
@@ -243,7 +246,7 @@ object Chapter {
|
|||||||
|
|
||||||
return ImageResponse.findFileNameStartingWith(
|
return ImageResponse.findFileNameStartingWith(
|
||||||
chapterDir,
|
chapterDir,
|
||||||
getPageName(0)
|
getPageName(1)
|
||||||
) != null
|
) != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user