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
This commit is contained in:
AwkwardPeak7 2023-10-28 20:45:24 +05:00 committed by GitHub
parent 0a1b6b18d2
commit 61274c5aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 40 deletions

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.extension.all.flamescans package eu.kanade.tachiyomi.extension.en.flamecomics
import android.app.Application import android.app.Application
import android.content.SharedPreferences
import android.graphics.Bitmap import android.graphics.Bitmap
import android.graphics.BitmapFactory import android.graphics.BitmapFactory
import android.graphics.Canvas import android.graphics.Canvas
@ -9,7 +8,7 @@ import android.graphics.Rect
import androidx.preference.PreferenceScreen import androidx.preference.PreferenceScreen
import androidx.preference.SwitchPreferenceCompat import androidx.preference.SwitchPreferenceCompat
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia 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.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page 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 eu.kanade.tachiyomi.source.model.SManga
import okhttp3.Interceptor import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaType import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Protocol import okhttp3.Protocol
import okhttp3.Response import okhttp3.Response
import okhttp3.ResponseBody.Companion.toResponseBody import okhttp3.ResponseBody.Companion.toResponseBody
@ -26,28 +24,23 @@ import rx.Observable
import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
import java.text.SimpleDateFormat
import java.util.Locale
open class FlameScans( class FlameComics : MangaThemesia(
override val baseUrl: String, "Flame Comics",
override val lang: String, "https://flamecomics.com",
mangaUrlDirectory: String, "en",
dateFormat: SimpleDateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale.US), mangaUrlDirectory = "/series",
) : MangaThemesia( ) {
"Flame Scans",
baseUrl,
lang,
mangaUrlDirectory = mangaUrlDirectory,
dateFormat = dateFormat,
),
ConfigurableSource {
private val preferences: SharedPreferences by lazy { // Flame Scans -> Flame Comics
override val id = 6350607071566689772
private val preferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000) Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
} }
override val client: OkHttpClient = super.client.newBuilder() override val client = super.client.newBuilder()
.rateLimit(2, 7)
.addInterceptor(::composedImageIntercept) .addInterceptor(::composedImageIntercept)
.build() .build()

View File

@ -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()
}

View File

@ -15,7 +15,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
override val sources = listOf( override val sources = listOf(
MultiLang("Asura Scans", "https://asuratoon.com", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 31), 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), MultiLang("Miau Scan", "https://miauscans.com", listOf("es", "pt-BR"), overrideVersionCode = 1),
SingleLang("AiYuManga", "https://aiyumanhua.com", "es", overrideVersionCode = 8), SingleLang("AiYuManga", "https://aiyumanhua.com", "es", overrideVersionCode = 8),
SingleLang("Alceascan", "https://alceascan.my.id", "id"), SingleLang("Alceascan", "https://alceascan.my.id", "id"),
@ -37,6 +36,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("EnryuManga", "https://enryumanga.com", "en"), SingleLang("EnryuManga", "https://enryumanga.com", "en"),
SingleLang("Epsilon Scan", "https://epsilonscan.fr", "fr", isNsfw = true), SingleLang("Epsilon Scan", "https://epsilonscan.fr", "fr", isNsfw = true),
SingleLang("Fairy Manga", "https://fairymanga.com", "en", className = "QueenScans", overrideVersionCode = 1), 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("Franxx Mangás", "https://franxxmangas.net", "pt-BR", className = "FranxxMangas", isNsfw = true),
SingleLang("Freak Scans", "https://freakscans.com", "en"), SingleLang("Freak Scans", "https://freakscans.com", "en"),
SingleLang("Gecenin Lordu", "https://geceninlordu.com", "tr", overrideVersionCode = 1), SingleLang("Gecenin Lordu", "https://geceninlordu.com", "tr", overrideVersionCode = 1),