Remove a prefix in URLs and update SS name. (#13790)

This commit is contained in:
Alessandro Jean 2022-10-09 14:14:50 -03:00 committed by GitHub
parent 7b4cd430a1
commit 6fbb654e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 21 deletions

View File

@ -1,20 +0,0 @@
package eu.kanade.tachiyomi.extension.pt.sinensis
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class Sinensis : Madara(
"Sinensis",
"https://sinensisscans.com",
"pt-BR",
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.build()
}

View File

@ -0,0 +1,44 @@
package eu.kanade.tachiyomi.extension.pt.sinensis
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import okhttp3.OkHttpClient
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class SinensisScan : Madara(
"Sinensis Scan",
"https://sinensisscans.com",
"pt-BR",
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
) {
// Name changed from Sinensis to Sinensis Scan
override val id: Long = 3891513807564817914
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.build()
override fun popularMangaFromElement(element: Element): SManga {
return super.popularMangaFromElement(element).apply {
url = url.removePrefix("/home")
}
}
override fun searchMangaFromElement(element: Element): SManga {
return super.searchMangaFromElement(element).apply {
url = url.removePrefix("/home")
}
}
override fun chapterFromElement(element: Element): SChapter {
return super.chapterFromElement(element).apply {
url = url.removePrefix("/home")
}
}
}

View File

@ -418,7 +418,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Shimada Scans", "https://shimadascans.com", "en"),
SingleLang("ShinobiScans", "https://shinobiscans.com", "it"),
SingleLang("ShoujoHearts", "https://shoujohearts.com", "en", overrideVersionCode = 2),
SingleLang("Sinensis", "https://sinensisscans.com", "pt-BR", overrideVersionCode = 3),
SingleLang("Sinensis Scan", "https://sinensisscans.com", "pt-BR", pkgName = "sinensis", overrideVersionCode = 4),
SingleLang("SISI GELAP", "https://sigel.xyz", "id", overrideVersionCode = 3),
SingleLang("Siyahmelek", "https://siyahmelek.net", "tr", isNsfw = true, overrideVersionCode = 3),
SingleLang("Skymanga", "https://skymanga.co", "en", isNsfw = true, overrideVersionCode = 2),