Omega Scans: Migrate to HeanCms (#15953)
* OmegaScans: Migrate to HeanCms * reorder generator
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 104 KiB |
|
@ -0,0 +1,42 @@
|
|||
package eu.kanade.tachiyomi.extension.en.omegascans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.heancms.HeanCms
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
|
||||
class OmegaScans : HeanCms("Omega Scans", "https://omegascans.org", "en") {
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.rateLimitHost(apiUrl.toHttpUrl(), 1)
|
||||
.build()
|
||||
|
||||
// Site changed from Mangathemesia to HeanCms.
|
||||
override val versionId = 2
|
||||
override val fetchAllTitles = false
|
||||
override val coverPath = ""
|
||||
|
||||
override fun popularMangaParse(response: Response): MangasPage {
|
||||
return super.popularMangaParse(response).apply {
|
||||
this.mangas.forEach {
|
||||
it.thumbnail_url = it.thumbnail_url?.substringAfter("$apiUrl/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun searchMangaParse(response: Response): MangasPage {
|
||||
return super.searchMangaParse(response).apply {
|
||||
this.mangas.forEach {
|
||||
it.thumbnail_url = it.thumbnail_url?.substringAfter("$apiUrl/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga {
|
||||
return super.mangaDetailsParse(response).apply {
|
||||
thumbnail_url = thumbnail_url?.substringAfter("$apiUrl/")
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 103 KiB |
|
@ -12,6 +12,7 @@ class HeanCmsGenerator : ThemeSourceGenerator {
|
|||
override val baseVersionCode: Int = 10
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 16),
|
||||
SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),
|
||||
SingleLang("YugenMangas", "https://yugenmangas.com", "es", isNsfw = true, overrideVersionCode = 1),
|
||||
)
|
||||
|
|
|
@ -89,7 +89,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Ngomik", "https://ngomik.net", "id", overrideVersionCode = 2),
|
||||
SingleLang("NIGHT SCANS", "https://nightscans.org", "en", isNsfw = true, className = "NightScans", overrideVersionCode = 1),
|
||||
SingleLang("Nocturnal Scans", "https://nocturnalscans.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true),
|
||||
SingleLang("Origami Orpheans", "https://origami-orpheans.com.br", "pt-BR", overrideVersionCode = 9),
|
||||
SingleLang("Ozul Scans", "https://ozulscans.com", "ar"),
|
||||
SingleLang("Patatescans", "https://patatescans.com", "fr", isNsfw = true, overrideVersionCode = 2),
|
||||
|
|