Skip to content

Commit

Permalink
SushiScans sources: Update URL & fix search (#19301)
Browse files Browse the repository at this point in the history
* SushiScanFr: Update URL

* Sushi-Scan: Fix search not working

* SushiScan: Update searchMangaRequest method

* Add missing imports
  • Loading branch information
KirinRaikage authored Dec 14, 2023
1 parent 234b5d3 commit 29534aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions multisrc/overrides/mangathemesia/sushiscan/src/SushiScan.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package eu.kanade.tachiyomi.extension.fr.sushiscan

import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SManga
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromString
import okhttp3.Headers
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
Expand All @@ -32,6 +36,14 @@ class SushiScan : MangaThemesia("Sushi-Scan", "https://sushiscan.net", "fr", man
else -> SManga.UNKNOWN
}

override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val url = "$baseUrl/page/$page".toHttpUrl().newBuilder()
.addQueryParameter("s", query)
.build()

return GET(url, headers)
}

override fun mangaDetailsParse(document: Document): SManga =
super.mangaDetailsParse(document).apply {
status = document.select(seriesStatusSelector).text().parseStatus()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale

class SushiScanFR : MangaThemesia("Sushiscan.fr", "https://sushiscan.fr", "fr", dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale.FRENCH)) {
class SushiScanFR : MangaThemesia("Sushiscan.fr", "https://anime-sama.me", "fr", dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale.FRENCH)) {
override val altNamePrefix = "Nom alternatif : "
override val seriesAuthorSelector = ".imptdt:contains(Auteur) i, .fmed b:contains(Auteur)+span"
override val seriesStatusSelector = ".imptdt:contains(Statut) i"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("Summer Fansub", "https://smmr.in", "pt-BR", isNsfw = true),
SingleLang("SummerToon", "https://summertoon.com", "tr"),
SingleLang("Surya Scans", "https://suryacomics.com", "en", overrideVersionCode = 2),
SingleLang("Sushi-Scan", "https://sushiscan.net", "fr", className = "SushiScan", overrideVersionCode = 9),
SingleLang("Sushiscan.fr", "https://sushiscan.fr", "fr", className = "SushiScanFR"),
SingleLang("Sushi-Scan", "https://sushiscan.net", "fr", className = "SushiScan", overrideVersionCode = 10),
SingleLang("Sushiscan.fr", "https://anime-sama.me", "fr", className = "SushiScanFR", overrideVersionCode = 1),
SingleLang("Tarot Scans", "https://www.tarotscans.com", "tr"),
SingleLang("Tecno Scan", "https://tecnoscann.com", "es", isNsfw = true, overrideVersionCode = 6),
SingleLang("TenkaiScan", "https://tenkaiscan.net", "es", isNsfw = true),
Expand Down

0 comments on commit 29534aa

Please sign in to comment.