fix: Scan VF (#3395)

* fix Scan VF

* increase version code

* override function
This commit is contained in:
Mylloon 2024-06-05 14:27:33 +02:00 committed by GitHub
parent 6216393f98
commit 85393c74c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 3 deletions

View File

@ -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 {

View File

@ -3,7 +3,7 @@ ext {
extClass = '.ScanVF'
themePkg = 'mmrcms'
baseUrl = 'https://www.scan-vf.net'
overrideVersionCode = 1
overrideVersionCode = 2
}
apply from: "$rootDir/common.gradle"

View File

@ -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)
}
}