Manga-Scan: Fix manga name with useless words (#390)

* Manga-Scan: Fix manga name with useless words

* Add missing imports
This commit is contained in:
KirinRaikage 2024-01-19 17:52:49 +01:00 committed by GitHub
parent 05a4646c25
commit e0c44f4670
2 changed files with 10 additions and 1 deletions

View File

@ -3,9 +3,18 @@ package eu.kanade.tachiyomi.extension.fr.mangascan
import eu.kanade.tachiyomi.multisrc.mmrcms.MMRCMS
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.Request
import okhttp3.Response
class MangaScan : MMRCMS("Manga-Scan", "https://mangascan-fr.com", "fr") {
override fun mangaDetailsParse(response: Response): SManga {
return super.mangaDetailsParse(response).apply {
title = title.substringBefore("Chapitres en ligne").substringAfter("Scan").trim()
}
}
override fun imageRequest(page: Page): Request {
val newHeaders = headersBuilder()
.set("Referer", baseUrl)

View File

@ -27,7 +27,7 @@ class MMRCMSGenerator : ThemeSourceGenerator {
SingleLang("MangaID", "https://mangaid.click", "id", overrideVersionCode = 1),
SingleLang("Jpmangas", "https://jpmangas.xyz", "fr", overrideVersionCode = 2),
SingleLang("Manga-FR", "https://manga-fr.cc", "fr", className = "MangaFR", overrideVersionCode = 2),
SingleLang("Manga-Scan", "https://mangascan-fr.com", "fr", className = "MangaScan", overrideVersionCode = 3),
SingleLang("Manga-Scan", "https://mangascan-fr.com", "fr", className = "MangaScan", overrideVersionCode = 4),
SingleLang("Ama Scans", "https://amascan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
SingleLang("Bentoscan", "https://bentoscan.com", "fr"),
// NOTE: THIS SOURCE CONTAINS A CUSTOM LANGUAGE SYSTEM (which will be ignored)!