diff --git a/lib-multisrc/mmrcms/src/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMS.kt b/lib-multisrc/mmrcms/src/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMS.kt index 708b02543..50fa20e1b 100644 --- a/lib-multisrc/mmrcms/src/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMS.kt +++ b/lib-multisrc/mmrcms/src/eu/kanade/tachiyomi/multisrc/mmrcms/MMRCMS.kt @@ -208,7 +208,7 @@ constructor( override fun searchMangaNextPageSelector(): String? = ".pagination a[rel=next]" - protected fun parseSearchDirectory(page: Int): MangasPage { + protected open fun parseSearchDirectory(page: Int): MangasPage { val manga = searchDirectory.subList((page - 1) * 24, min(page * 24, searchDirectory.size)) .map { SManga.create().apply { diff --git a/src/fr/scanvf/build.gradle b/src/fr/scanvf/build.gradle index 9a3e75383..9eb14c354 100644 --- a/src/fr/scanvf/build.gradle +++ b/src/fr/scanvf/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.ScanVF' themePkg = 'mmrcms' baseUrl = 'https://www.scan-vf.net' - overrideVersionCode = 1 + overrideVersionCode = 2 } apply from: "$rootDir/common.gradle" diff --git a/src/fr/scanvf/src/eu/kanade/tachiyomi/extension/fr/scanvf/ScanVF.kt b/src/fr/scanvf/src/eu/kanade/tachiyomi/extension/fr/scanvf/ScanVF.kt index 1099b8a68..a2731d521 100644 --- a/src/fr/scanvf/src/eu/kanade/tachiyomi/extension/fr/scanvf/ScanVF.kt +++ b/src/fr/scanvf/src/eu/kanade/tachiyomi/extension/fr/scanvf/ScanVF.kt @@ -1,10 +1,28 @@ package eu.kanade.tachiyomi.extension.fr.scanvf import eu.kanade.tachiyomi.multisrc.mmrcms.MMRCMS +import eu.kanade.tachiyomi.source.model.MangasPage +import eu.kanade.tachiyomi.source.model.SManga +import kotlin.math.min class ScanVF : MMRCMS( "Scan VF", "https://www.scan-vf.net", "fr", + itemPath = "", supportsAdvancedSearch = false, -) +) { + override fun parseSearchDirectory(page: Int): MangasPage { + val manga = searchDirectory.subList((page - 1) * 24, min(page * 24, searchDirectory.size)) + .map { + SManga.create().apply { + url = "/${it.data}" + title = it.value + thumbnail_url = guessCover(url, null) + } + } + val hasNextPage = (page + 1) * 24 <= searchDirectory.size + + return MangasPage(manga, hasNextPage) + } +}