From 6ecb2a6f87f9df21232a85b71b9a83b6a8fecaf4 Mon Sep 17 00:00:00 2001 From: Chopper <156493704+ttony2chopper@users.noreply.github.com> Date: Tue, 7 May 2024 08:08:26 -0300 Subject: [PATCH] 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 --- src/pt/sussyscan/build.gradle | 2 +- .../tachiyomi/extension/pt/sussyscan/SussyScan.kt | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pt/sussyscan/build.gradle b/src/pt/sussyscan/build.gradle index 088e2a307..664a9034c 100644 --- a/src/pt/sussyscan/build.gradle +++ b/src/pt/sussyscan/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.SussyScan' themePkg = 'madara' baseUrl = 'https://sussyscan.com' - overrideVersionCode = 0 + overrideVersionCode = 1 } apply from: "$rootDir/common.gradle" diff --git a/src/pt/sussyscan/src/eu/kanade/tachiyomi/extension/pt/sussyscan/SussyScan.kt b/src/pt/sussyscan/src/eu/kanade/tachiyomi/extension/pt/sussyscan/SussyScan.kt index bf0cd4258..5695f94d9 100644 --- a/src/pt/sussyscan/src/eu/kanade/tachiyomi/extension/pt/sussyscan/SussyScan.kt +++ b/src/pt/sussyscan/src/eu/kanade/tachiyomi/extension/pt/sussyscan/SussyScan.kt @@ -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 + } }