mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-08 05:14:37 -05:00
Update Local Source to latest Tachiyomi (#637)
* Update Local Source to latest Tachiyomi * More formatting * Enable zip64
This commit is contained in:
@@ -11,7 +11,6 @@ import org.jetbrains.exposed.sql.update
|
||||
import suwayomi.tachidesk.graphql.types.ChapterMetaType
|
||||
import suwayomi.tachidesk.graphql.types.ChapterType
|
||||
import suwayomi.tachidesk.manga.impl.Chapter
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle
|
||||
import suwayomi.tachidesk.manga.impl.util.source.GetCatalogueSource.getCatalogueSourceOrNull
|
||||
import suwayomi.tachidesk.manga.model.table.ChapterMetaTable
|
||||
import suwayomi.tachidesk.manga.model.table.ChapterTable
|
||||
@@ -213,12 +212,12 @@ class ChapterMutation {
|
||||
val source = getCatalogueSourceOrNull(manga[MangaTable.sourceReference])!!
|
||||
|
||||
return future {
|
||||
source.fetchPageList(
|
||||
source.getPageList(
|
||||
SChapter.create().apply {
|
||||
url = chapter[ChapterTable.url]
|
||||
name = chapter[ChapterTable.name]
|
||||
}
|
||||
).awaitSingle()
|
||||
)
|
||||
}.thenApply { pageList ->
|
||||
transaction {
|
||||
PageTable.deleteWhere { PageTable.chapter eq chapterId }
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.jetbrains.exposed.sql.update
|
||||
import suwayomi.tachidesk.manga.impl.Manga.getManga
|
||||
import suwayomi.tachidesk.manga.impl.download.DownloadManager
|
||||
import suwayomi.tachidesk.manga.impl.download.DownloadManager.EnqueueInput
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle
|
||||
import suwayomi.tachidesk.manga.impl.util.source.GetCatalogueSource.getCatalogueSourceOrStub
|
||||
import suwayomi.tachidesk.manga.model.dataclass.ChapterDataClass
|
||||
import suwayomi.tachidesk.manga.model.dataclass.MangaChapterDataClass
|
||||
@@ -118,12 +117,13 @@ object Chapter {
|
||||
}
|
||||
|
||||
val numberOfCurrentChapters = getCountOfMangaChapters(mangaId)
|
||||
val chapterList = source.fetchChapterList(sManga).awaitSingle()
|
||||
val chapterList = source.getChapterList(sManga)
|
||||
|
||||
// Recognize number for new chapters.
|
||||
chapterList.forEach {
|
||||
(source as? HttpSource)?.prepareNewChapter(it, sManga)
|
||||
ChapterRecognition.parseChapterNumber(it, sManga)
|
||||
chapterList.forEach { chapter ->
|
||||
(source as? HttpSource)?.prepareNewChapter(chapter, sManga)
|
||||
val chapterNumber = ChapterRecognition.parseChapterNumber(manga.title, chapter.name, chapter.chapter_number.toDouble())
|
||||
chapter.chapter_number = chapterNumber.toFloat()
|
||||
}
|
||||
|
||||
var now = Instant.now().epochSecond
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.kodein.di.conf.global
|
||||
import org.kodein.di.instance
|
||||
import suwayomi.tachidesk.manga.impl.MangaList.proxyThumbnailUrl
|
||||
import suwayomi.tachidesk.manga.impl.Source.getSource
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle
|
||||
import suwayomi.tachidesk.manga.impl.util.network.await
|
||||
import suwayomi.tachidesk.manga.impl.util.source.GetCatalogueSource.getCatalogueSourceOrNull
|
||||
import suwayomi.tachidesk.manga.impl.util.source.GetCatalogueSource.getCatalogueSourceOrStub
|
||||
@@ -105,7 +104,7 @@ object Manga {
|
||||
url = mangaEntry[MangaTable.url]
|
||||
title = mangaEntry[MangaTable.title]
|
||||
}
|
||||
val networkManga = source.fetchMangaDetails(sManga).awaitSingle()
|
||||
val networkManga = source.getMangaDetails(sManga)
|
||||
sManga.copyFrom(networkManga)
|
||||
|
||||
transaction {
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.jetbrains.exposed.sql.update
|
||||
import suwayomi.tachidesk.manga.impl.Page.getPageName
|
||||
import suwayomi.tachidesk.manga.impl.util.getChapterCbzPath
|
||||
import suwayomi.tachidesk.manga.impl.util.getChapterDownloadPath
|
||||
import suwayomi.tachidesk.manga.impl.util.lang.awaitSingle
|
||||
import suwayomi.tachidesk.manga.impl.util.source.GetCatalogueSource.getCatalogueSourceOrStub
|
||||
import suwayomi.tachidesk.manga.impl.util.storage.ImageResponse
|
||||
import suwayomi.tachidesk.manga.model.dataclass.ChapterDataClass
|
||||
@@ -64,12 +63,12 @@ private class ChapterForDownload(
|
||||
val mangaEntry = transaction { MangaTable.select { MangaTable.id eq mangaId }.first() }
|
||||
val source = getCatalogueSourceOrStub(mangaEntry[MangaTable.sourceReference])
|
||||
|
||||
return source.fetchPageList(
|
||||
return source.getPageList(
|
||||
SChapter.create().apply {
|
||||
url = chapterEntry[ChapterTable.url]
|
||||
name = chapterEntry[ChapterTable.name]
|
||||
}
|
||||
).awaitSingle()
|
||||
)
|
||||
}
|
||||
|
||||
private fun markAsNotDownloaded() {
|
||||
|
||||
Reference in New Issue
Block a user