From 61274c5aa022059b688a63d200461d2ba2fab7cb Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:45:24 +0500 Subject: [PATCH] FS: update url (#18766) * FlameScans: update url * tfw thanks Riztard * change name & pkg, as MulitLang not needed for this users will have to install new extension --- .../res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/web_hi_res_512.png | Bin .../src/FlameComics.kt} | 35 +++++++----------- .../flamescans/src/FlameScansFactory.kt | 18 --------- .../mangathemesia/MangaThemesiaGenerator.kt | 2 +- 9 files changed, 15 insertions(+), 40 deletions(-) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/mipmap-hdpi/ic_launcher.png (100%) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/mipmap-mdpi/ic_launcher.png (100%) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/mipmap-xhdpi/ic_launcher.png (100%) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/mipmap-xxhdpi/ic_launcher.png (100%) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename multisrc/overrides/mangathemesia/{flamescans => flamecomics}/res/web_hi_res_512.png (100%) rename multisrc/overrides/mangathemesia/{flamescans/src/FlameScans.kt => flamecomics/src/FlameComics.kt} (92%) delete mode 100644 multisrc/overrides/mangathemesia/flamescans/src/FlameScansFactory.kt diff --git a/multisrc/overrides/mangathemesia/flamescans/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/flamecomics/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/flamecomics/res/mipmap-hdpi/ic_launcher.png diff --git a/multisrc/overrides/mangathemesia/flamescans/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/flamecomics/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/flamecomics/res/mipmap-mdpi/ic_launcher.png diff --git a/multisrc/overrides/mangathemesia/flamescans/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xhdpi/ic_launcher.png diff --git a/multisrc/overrides/mangathemesia/flamescans/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xxhdpi/ic_launcher.png diff --git a/multisrc/overrides/mangathemesia/flamescans/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/mangathemesia/flamecomics/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/multisrc/overrides/mangathemesia/flamescans/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/flamecomics/res/web_hi_res_512.png similarity index 100% rename from multisrc/overrides/mangathemesia/flamescans/res/web_hi_res_512.png rename to multisrc/overrides/mangathemesia/flamecomics/res/web_hi_res_512.png diff --git a/multisrc/overrides/mangathemesia/flamescans/src/FlameScans.kt b/multisrc/overrides/mangathemesia/flamecomics/src/FlameComics.kt similarity index 92% rename from multisrc/overrides/mangathemesia/flamescans/src/FlameScans.kt rename to multisrc/overrides/mangathemesia/flamecomics/src/FlameComics.kt index f86fb2988..8e7fe96e6 100644 --- a/multisrc/overrides/mangathemesia/flamescans/src/FlameScans.kt +++ b/multisrc/overrides/mangathemesia/flamecomics/src/FlameComics.kt @@ -1,7 +1,6 @@ -package eu.kanade.tachiyomi.extension.all.flamescans +package eu.kanade.tachiyomi.extension.en.flamecomics import android.app.Application -import android.content.SharedPreferences import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.Canvas @@ -9,7 +8,7 @@ import android.graphics.Rect import androidx.preference.PreferenceScreen import androidx.preference.SwitchPreferenceCompat import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia -import eu.kanade.tachiyomi.source.ConfigurableSource +import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.Page @@ -17,7 +16,6 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import okhttp3.Interceptor import okhttp3.MediaType.Companion.toMediaType -import okhttp3.OkHttpClient import okhttp3.Protocol import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody @@ -26,28 +24,23 @@ import rx.Observable import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get import java.io.ByteArrayOutputStream -import java.text.SimpleDateFormat -import java.util.Locale -open class FlameScans( - override val baseUrl: String, - override val lang: String, - mangaUrlDirectory: String, - dateFormat: SimpleDateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.US), -) : MangaThemesia( - "Flame Scans", - baseUrl, - lang, - mangaUrlDirectory = mangaUrlDirectory, - dateFormat = dateFormat, -), - ConfigurableSource { +class FlameComics : MangaThemesia( + "Flame Comics", + "https://flamecomics.com", + "en", + mangaUrlDirectory = "/series", +) { - private val preferences: SharedPreferences by lazy { + // Flame Scans -> Flame Comics + override val id = 6350607071566689772 + + private val preferences by lazy { Injekt.get().getSharedPreferences("source_$id", 0x0000) } - override val client: OkHttpClient = super.client.newBuilder() + override val client = super.client.newBuilder() + .rateLimit(2, 7) .addInterceptor(::composedImageIntercept) .build() diff --git a/multisrc/overrides/mangathemesia/flamescans/src/FlameScansFactory.kt b/multisrc/overrides/mangathemesia/flamescans/src/FlameScansFactory.kt deleted file mode 100644 index a617de108..000000000 --- a/multisrc/overrides/mangathemesia/flamescans/src/FlameScansFactory.kt +++ /dev/null @@ -1,18 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.flamescans - -import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.SourceFactory -import okhttp3.OkHttpClient -import java.util.concurrent.TimeUnit - -class FlameScansFactory : SourceFactory { - override fun createSources() = listOf( - FlameScansEn(), - ) -} - -class FlameScansEn : FlameScans("https://flamescans.org", "en", "/series") { - override val client: OkHttpClient = super.client.newBuilder() - .rateLimit(2, 7, TimeUnit.SECONDS) - .build() -} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index 0e8b88a05..aac386ddd 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -15,7 +15,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { override val sources = listOf( MultiLang("Asura Scans", "https://asuratoon.com", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 31), - MultiLang("Flame Scans", "https://flamescans.org", listOf("en"), className = "FlameScansFactory", pkgName = "flamescans", overrideVersionCode = 5), MultiLang("Miau Scan", "https://miauscans.com", listOf("es", "pt-BR"), overrideVersionCode = 1), SingleLang("AiYuManga", "https://aiyumanhua.com", "es", overrideVersionCode = 8), SingleLang("Alceascan", "https://alceascan.my.id", "id"), @@ -37,6 +36,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("EnryuManga", "https://enryumanga.com", "en"), SingleLang("Epsilon Scan", "https://epsilonscan.fr", "fr", isNsfw = true), SingleLang("Fairy Manga", "https://fairymanga.com", "en", className = "QueenScans", overrideVersionCode = 1), + SingleLang("Flame Comics", "https://flamecomics.com", "en"), SingleLang("Franxx Mangás", "https://franxxmangas.net", "pt-BR", className = "FranxxMangas", isNsfw = true), SingleLang("Freak Scans", "https://freakscans.com", "en"), SingleLang("Gecenin Lordu", "https://geceninlordu.com", "tr", overrideVersionCode = 1),