mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 10:22:47 +01:00
SussyScan: Fix load mangas (#2870)
* Remove mangaSubString * Keeps thumbnail from popular, latest and search * Remove date format * Remove unused import * Add date format * Fix lint * Add thumbnail from manga datails
This commit is contained in:
parent
7ae0fe1b76
commit
6ecb2a6f87
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.SussyScan'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://sussyscan.com'
|
||||
overrideVersionCode = 0
|
||||
overrideVersionCode = 1
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.pt.sussyscan
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
@ -9,7 +10,7 @@ class SussyScan : Madara(
|
||||
"Sussy Scan",
|
||||
"https://sussyscan.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")),
|
||||
SimpleDateFormat("MMMM dd, yyyy", Locale("pt", "BR")),
|
||||
) {
|
||||
override val client = super.client.newBuilder()
|
||||
.rateLimit(2)
|
||||
@ -17,5 +18,10 @@ class SussyScan : Madara(
|
||||
|
||||
override val useNewChapterEndpoint = true
|
||||
|
||||
override val mangaSubString = "sus"
|
||||
override val mangaDetailsSelectorThumbnail = "head meta[property='og:image']"
|
||||
|
||||
override fun imageFromElement(element: Element): String? {
|
||||
return super.imageFromElement(element)?.takeIf { it.isNotEmpty() }
|
||||
?: element.attr("content") // Thumbnail from <head>
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user