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:
Chopper 2024-05-07 08:08:26 -03:00 committed by GitHub
parent 7ae0fe1b76
commit 6ecb2a6f87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.SussyScan'
themePkg = 'madara'
baseUrl = 'https://sussyscan.com'
overrideVersionCode = 0
overrideVersionCode = 1
}
apply from: "$rootDir/common.gradle"

View File

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