Migrate GS from Madara to HeanCMS (#16838)

* Migrate GS from Madara to HeanCMS (closes #16809).

* Rename file to follow the linting conventions.

* Rename Scans to Scans to use the old package name.

* Rename the source name attribute as well.
This commit is contained in:
Alessandro Jean 2023-06-23 16:08:18 -03:00 committed by GitHub
parent d8bfdfe7d9
commit c45a9a0daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 23 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -0,0 +1,30 @@
package eu.kanade.tachiyomi.extension.pt.gloriousscan
import eu.kanade.tachiyomi.multisrc.heancms.HeanCms
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.TimeZone
class GloriousScan : HeanCms(
"Glorious Scan",
"https://gloriousscan.com",
"pt-BR",
) {
override val client: OkHttpClient = super.client.newBuilder()
.rateLimitHost(apiUrl.toHttpUrl(), 1, 2)
.build()
// Site changed from Madara to HeanCms.
override val versionId = 2
override val coverPath = ""
override val dateFormat: SimpleDateFormat = super.dateFormat.apply {
timeZone = TimeZone.getTimeZone("GMT+02:00")
}
override val fetchAllTitles = false
}

View File

@ -1,22 +0,0 @@
package eu.kanade.tachiyomi.extension.pt.gloriousscan
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 GloriousScan : Madara(
"Glorious Scan",
"https://gloriousscan.com",
"pt-BR",
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR")),
) {
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.build()
override val useNewChapterEndpoint = true
}

View File

@ -12,6 +12,7 @@ class HeanCmsGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 13
override val sources = listOf(
SingleLang("Glorious Scan", "https://gloriousscan.com", "pt-BR", overrideVersionCode = 17),
SingleLang("Omega Scans", "https://omegascans.org", "en", isNsfw = true, overrideVersionCode = 17),
SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),
SingleLang("YugenMangas", "https://yugenmangas.com", "es", isNsfw = true, overrideVersionCode = 1),

View File

@ -113,7 +113,6 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("GeassToon", "https://geasstoon.com", "tr"),
SingleLang("Gekkou Hentai", "https://hentai.gekkouscans.com.br", "pt-BR", isNsfw = true),
SingleLang("Gekkou Scans", "https://gekkou.com.br", "pt-BR", isNsfw = true, pkgName = "gekkouscan"),
SingleLang("Glorious Scan", "https://gloriousscan.com", "pt-BR"),
SingleLang("Glory Manga", "https://glorymanga.com", "tr"),
SingleLang("Goof Fansub", "https://gooffansub.com", "pt-BR", isNsfw = true),
SingleLang("GuncelManga", "https://guncelmanga.com", "tr", overrideVersionCode = 1),