diff --git a/src/all/tachidesk/build.gradle b/src/all/tachidesk/build.gradle index 6e124a7..fc0c11e 100644 --- a/src/all/tachidesk/build.gradle +++ b/src/all/tachidesk/build.gradle @@ -7,7 +7,7 @@ ext { extName = 'Suwayomi' pkgNameSuffix = 'all.tachidesk' extClass = '.Tachidesk' - extVersionCode = 15 + extVersionCode = 16 } apply from: "$rootDir/common.gradle" diff --git a/src/all/tachidesk/src/eu/kanade/tachiyomi/extension/all/tachidesk/Tachidesk.kt b/src/all/tachidesk/src/eu/kanade/tachiyomi/extension/all/tachidesk/Tachidesk.kt index 83f8b74..203d815 100644 --- a/src/all/tachidesk/src/eu/kanade/tachiyomi/extension/all/tachidesk/Tachidesk.kt +++ b/src/all/tachidesk/src/eu/kanade/tachiyomi/extension/all/tachidesk/Tachidesk.kt @@ -28,6 +28,7 @@ import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.ConfigurableSource import eu.kanade.tachiyomi.source.UnmeteredSource import eu.kanade.tachiyomi.source.model.Filter +import eu.kanade.tachiyomi.source.model.Filter.Sort.Selection import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page @@ -81,7 +82,7 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() { private val basePassword by lazy { getPrefBasePassword() } override val lang = "all" - override val supportsLatest = false + override val supportsLatest = true override val client: OkHttpClient = network.client.newBuilder() @@ -108,6 +109,22 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() { return fetchSearchManga(page, "", FilterList()) } + // ------------- Latest Manga ------------- + + override fun latestUpdatesRequest(page: Int): Request = + throw Exception("Not used") + + override fun latestUpdatesParse(response: Response): MangasPage = + throw Exception("Not used") + + override fun fetchLatestUpdates(page: Int): Observable { + return fetchSearchManga( + page, + "", + FilterList(SortBy(sortByOptions).apply { state = Selection(3, false) }), + ) + } + // ------------- Manga Details ------------- override fun getMangaUrl(manga: SManga): String { @@ -631,10 +648,6 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() { // ------------- Not Used ------------- - override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used") - - override fun latestUpdatesParse(response: Response): MangasPage = throw Exception("Not used") - override fun pageListParse(response: Response): List = throw Exception("Not used") override fun imageUrlParse(response: Response): String = throw Exception("Not used")