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
f767aa8b6d
commit
483a9bbc70
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.SussyScan'
|
extClass = '.SussyScan'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://sussyscan.com'
|
baseUrl = 'https://sussyscan.com'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
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.multisrc.madara.Madara
|
||||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ class SussyScan : Madara(
|
||||||
"Sussy Scan",
|
"Sussy Scan",
|
||||||
"https://sussyscan.com",
|
"https://sussyscan.com",
|
||||||
"pt-BR",
|
"pt-BR",
|
||||||
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")),
|
SimpleDateFormat("MMMM dd, yyyy", Locale("pt", "BR")),
|
||||||
) {
|
) {
|
||||||
override val client = super.client.newBuilder()
|
override val client = super.client.newBuilder()
|
||||||
.rateLimit(2)
|
.rateLimit(2)
|
||||||
|
@ -17,5 +18,10 @@ class SussyScan : Madara(
|
||||||
|
|
||||||
override val useNewChapterEndpoint = true
|
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