Omega Scans: Migrate to HeanCms (#15953)

* OmegaScans: Migrate to HeanCms

* reorder generator
This commit is contained in:
mobi2002 2023-04-04 20:39:35 +05:00 committed by GitHub
parent f2321f698b
commit 36cc9b4546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 43 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -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/")
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

View File

@ -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),
)

View File

@ -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),