Update to extensions-lib 1.3 (#11878)

This commit is contained in:
arkon 2022-06-05 09:49:54 -04:00 committed by GitHub
parent d925c30393
commit a578edb82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 69 additions and 59 deletions

View File

@ -27,7 +27,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files
@ -79,7 +79,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files
@ -117,7 +117,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files

View File

@ -35,7 +35,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files
@ -87,7 +87,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files
@ -138,7 +138,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: adopt
- name: Copy CI files

View File

@ -124,7 +124,7 @@ apply from: "$rootDir/common.gradle"
| `pkgNameSuffix` | A unique suffix added to `eu.kanade.tachiyomi.extension`. The language and the site name should be enough. Remember your extension code implementation must be placed in this package. |
| `extClass` | Points to the class that implements `Source`. You can use a relative path starting with a dot (the package name is the base path). This is used to find and instantiate the source(s). |
| `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. |
| `libVersion` | (Optional, defaults to `1.2`) The version of the [extensions library](https://github.com/tachiyomiorg/extensions-lib) used. |
| `libVersion` | (Optional, defaults to `1.3`) The version of the [extensions library](https://github.com/tachiyomiorg/extensions-lib) used. |
| `isNsfw` | (Optional, defaults to `false`) Flag to indicate that a source contains NSFW content. |
The extension's version name is generated automatically by concatenating `libVersion` and `extVersionCode`. With the example used above, the version would be `1.2.1`.

View File

@ -22,7 +22,7 @@ android {
targetSdkVersion AndroidConfig.targetSdk
applicationIdSuffix pkgNameSuffix
versionCode extVersionCode
versionName project.ext.properties.getOrDefault("libVersion", "1.2") + ".$extVersionCode"
versionName project.ext.properties.getOrDefault("libVersion", "1.3") + ".$extVersionCode"
setProperty("archivesBaseName", "tachiyomi-$pkgNameSuffix-v$versionName")
def readmes = project.projectDir.listFiles({ File file ->
file.name.equals("README.md") ||

View File

@ -1,29 +1,32 @@
[versions]
kotlin_version = "1.4.32"
coroutines_version = "1.4.3"
kotlin_version = "1.6.10"
coroutines_version = "1.6.0"
serialization_version = "1.3.2"
[libraries]
gradle-agp = { module = "com.android.tools.build:gradle", version = "4.2.1" }
gradle-agp = { module = "com.android.tools.build:gradle", version = "7.1.2" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin_version" }
gradle-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version" }
gradle-kotlinter = { module = "org.jmailen.gradle:kotlinter-gradle", version = "3.4.0" }
gradle-kotlinter = { module = "org.jmailen.gradle:kotlinter-gradle", version = "3.6.0" }
tachiyomi-lib = { module = "com.github.tachiyomiorg:extensions-lib", version = "58b2d3a" }
tachiyomi-lib = { module = "com.github.tachiyomiorg:extensions-lib", version = "1.3.1" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin_version" }
kotlin-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version = "1.2.0" }
kotlin-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.2.0" }
kotlin-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization_version" }
kotlin-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_version" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines_version" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines_version" }
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
jsoup = { module = "org.jsoup:jsoup", version = "1.13.1" }
duktape = { module = "com.squareup.duktape:duktape-android", version = "1.4.0" }
quickjs = { module = "app.cash.quickjs:quickjs-android", version = "0.9.2" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "4.9.1" }
rxandroid = { module = "io.reactivex:rxandroid", version = "1.2.1" }
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
[bundles]
common = ["tachiyomi-lib", "jsoup", "okhttp", "kotlin-stdlib", "injekt-core", "rxjava", "kotlin-protobuf", "kotlin-json"]
common = ["kotlin-stdlib", "injekt-core", "rxjava", "kotlin-protobuf", "kotlin-json", "jsoup", "okhttp", "tachiyomi-lib", "duktape", "quickjs"]
coroutines = ["coroutines-core", "coroutines-android"]
reactivex = ["rxandroid"]

View File

@ -20,6 +20,12 @@ repositories {
mavenCentral()
}
configurations {
compileOnly {
isCanBeResolved = true
}
}
dependencies {
compileOnly(libs.bundles.common)
}
@ -28,7 +34,8 @@ tasks {
val generateExtensions by registering {
doLast {
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
var classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
var classPath = (
configurations.compileOnly.get().asFileTree.toList() +
listOf(
configurations.androidApis.get().asFileTree.first().absolutePath, // android.jar path
"$projectDir/build/intermediates/aar_main_jar/debug/classes.jar" // jar made from this module

View File

@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.all.foolslidecustomizable
import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.multisrc.foolslide.FoolSlide
import eu.kanade.tachiyomi.source.SourceFactory
@ -42,7 +42,7 @@ class FoolSlideCustomizable : FoolSlide("FoolSlide Customizable", "", "other") {
companion object {
private const val DEFAULT_BASEURL = "https://127.0.0.1"
private const val BASE_URL_PREF_TITLE = "Example URL: https://domain.com/path_to/directory/"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_NAME}"
private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
private const val BASE_URL_PREF_SUMMARY = "Connect to a designated FoolSlide server"
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
}

View File

@ -5,7 +5,7 @@ import android.content.SharedPreferences
import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.GET
@ -274,7 +274,7 @@ class NeoxScanlator :
private const val REFERER = "https://google.com/"
private const val DEFAULT_BASE_URL = "https://neoxscans.net"
private val BASE_URL_PREF_KEY = "base_url_${BuildConfig.VERSION_NAME}"
private val BASE_URL_PREF_KEY = "base_url_${AppInfo.getVersionName()}"
private const val BASE_URL_PREF_TITLE = "URL da fonte"
private const val BASE_URL_PREF_SUMMARY = "Para uso temporário. Quando você atualizar a " +
"extensão, esta configuração será apagada."

View File

@ -4,7 +4,7 @@ import android.app.Application
import android.os.Build
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
@ -31,7 +31,7 @@ abstract class BakkinReaderX(
private val userAgent = "Mozilla/5.0 (" +
"Android ${Build.VERSION.RELEASE}; Mobile) " +
"Tachiyomi/${BuildConfig.VERSION_NAME}"
"Tachiyomi/${AppInfo.getVersionName()}"
protected val preferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)!!

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.comicake
import android.os.Build
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
@ -34,7 +34,7 @@ abstract class ComiCake(
private val userAgent = "Mozilla/5.0 (" +
"Android ${Build.VERSION.RELEASE}; Mobile) " +
"Tachiyomi/${BuildConfig.VERSION_NAME}"
"Tachiyomi/${AppInfo.getVersionName()}"
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", userAgent)

View File

@ -5,7 +5,7 @@ import android.content.SharedPreferences
import android.os.Build
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservable
import eu.kanade.tachiyomi.network.asObservableSuccess
@ -40,7 +40,7 @@ abstract class Guya(
"User-Agent",
"(Android ${Build.VERSION.RELEASE}; " +
"${Build.MANUFACTURER} ${Build.MODEL}) " +
"Tachiyomi/${BuildConfig.VERSION_NAME} ${Build.ID}"
"Tachiyomi/${AppInfo.getVersionName()} ${Build.ID}"
)
private val scanlators: ScanlatorStore = ScanlatorStore()

View File

@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.multisrc.mangadventure
import android.net.Uri
import android.os.Build.VERSION
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
@ -36,7 +36,7 @@ abstract class MangAdventure(
/** A user agent representing Tachiyomi. */
private val userAgent = "Mozilla/5.0 " +
"(Android ${VERSION.RELEASE}; Mobile) " +
"Tachiyomi/${BuildConfig.VERSION_NAME}"
"Tachiyomi/${AppInfo.getVersionName()}"
/** The URI of the site's API. */
private val apiUri by lazy {

View File

@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.extension.all.cubari
import android.app.Application
import android.os.Build
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
@ -42,7 +42,7 @@ open class Cubari(override val lang: String) : HttpSource() {
"User-Agent",
"(Android ${Build.VERSION.RELEASE}; " +
"${Build.MANUFACTURER} ${Build.MODEL}) " +
"Tachiyomi/${BuildConfig.VERSION_NAME} " +
"Tachiyomi/${AppInfo.getVersionName()} " +
Build.ID
)
}

View File

@ -7,7 +7,7 @@ import android.util.Log
import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.MultiSelectListPreference
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.extension.all.kavita.dto.AuthenticationDto
import eu.kanade.tachiyomi.extension.all.kavita.dto.ChapterDto
import eu.kanade.tachiyomi.extension.all.kavita.dto.MangaFormat
@ -859,13 +859,13 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, HttpSource()
override fun headersBuilder(): Headers.Builder {
if (jwtToken.isEmpty()) throw LoginErrorException("401 Error\nOPDS address got modified or is incorrect")
return Headers.Builder()
.add("User-Agent", "Tachiyomi Kavita v${BuildConfig.VERSION_NAME}")
.add("User-Agent", "Tachiyomi Kavita v${AppInfo.getVersionName()}")
.add("Content-Type", "application/json")
.add("Authorization", "Bearer $jwtToken")
}
private fun setupLoginHeaders(): Headers.Builder {
return Headers.Builder()
.add("User-Agent", "Tachiyomi Kavita v${BuildConfig.VERSION_NAME}")
.add("User-Agent", "Tachiyomi Kavita v${AppInfo.getVersionName()}")
.add("Content-Type", "application/json")
.add("Authorization", "Bearer $jwtToken")
}
@ -1147,13 +1147,13 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, HttpSource()
.parseAs<ServerInfoDto>()
Log.e(
LOG_TAG,
"Extension version: code=${BuildConfig.VERSION_CODE} name=${BuildConfig.VERSION_NAME}" +
"Extension version: code=${AppInfo.getVersionCode()} name=${AppInfo.getVersionName()}" +
" - - Kavita version: ${serverInfoDto.kavitaVersion}"
) // this is not a real error. Using this so it gets printed in dump logs if there's any error
} catch (e: EmptyRequestBody) {
Log.e(LOG_TAG, "Extension version: code=${BuildConfig.VERSION_CODE} - name=${BuildConfig.VERSION_NAME}")
Log.e(LOG_TAG, "Extension version: code=${AppInfo.getVersionCode()} - name=${AppInfo.getVersionName()}")
} catch (e: Exception) {
Log.e(LOG_TAG, "Tachiyomi version: code=${BuildConfig.VERSION_CODE} - name=${BuildConfig.VERSION_NAME}", e)
Log.e(LOG_TAG, "Tachiyomi version: code=${AppInfo.getVersionCode()} - name=${AppInfo.getVersionName()}", e)
}
try { // Load Filters
// Genres

View File

@ -5,7 +5,7 @@ import android.content.SharedPreferences
import android.text.InputType
import android.util.Log
import android.widget.Toast
import eu.kanade.tachiyomi.extension.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.extension.all.komga.dto.AuthorDto
import eu.kanade.tachiyomi.extension.all.komga.dto.BookDto
import eu.kanade.tachiyomi.extension.all.komga.dto.CollectionDto
@ -17,6 +17,7 @@ import eu.kanade.tachiyomi.extension.all.komga.dto.SeriesDto
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.UnmeteredSource
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
@ -44,7 +45,7 @@ import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
open class Komga(suffix: String = "") : ConfigurableSource, UnmeteredSource, HttpSource() {
override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/api/v1/series?page=${page - 1}&deleted=false", headers)
@ -396,7 +397,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
override fun headersBuilder(): Headers.Builder =
Headers.Builder()
.add("User-Agent", "TachiyomiKomga/${BuildConfig.VERSION_NAME}")
.add("User-Agent", "TachiyomiKomga/${AppInfo.getVersionName()}")
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)

View File

@ -4,7 +4,7 @@ import android.app.Application
import android.content.SharedPreferences
import android.text.InputType
import android.widget.Toast
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.asObservableSuccess
@ -212,7 +212,7 @@ class Mango : ConfigurableSource, HttpSource() {
override fun headersBuilder(): Headers.Builder =
Headers.Builder()
.add("User-Agent", "Tachiyomi Mango v${BuildConfig.VERSION_NAME}")
.add("User-Agent", "Tachiyomi Mango v${AppInfo.getVersionName()}")
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)

View File

@ -1,6 +1,6 @@
package eu.kanade.tachiyomi.extension.ca.fansubscat
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
@ -37,7 +37,7 @@ class FansubsCat : HttpSource() {
override val supportsLatest = true
override fun headersBuilder(): Headers.Builder = Headers.Builder()
.add("User-Agent", "Tachiyomi/FansubsCat/${BuildConfig.VERSION_NAME}")
.add("User-Agent", "Tachiyomi/FansubsCat/${AppInfo.getVersionName()}")
override val client: OkHttpClient = network.client

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.extension.en.vgperson
import android.os.Build.VERSION
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.FilterList
@ -29,7 +29,7 @@ class Vgperson : ParsedHttpSource() {
private val userAgent = "Mozilla/5.0 " +
"(Android ${VERSION.RELEASE}; Mobile) " +
"Tachiyomi/${BuildConfig.VERSION_NAME}"
"Tachiyomi/${AppInfo.getVersionName()}"
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", userAgent)

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.extension.en.warforrayuba
import android.os.Build
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.extension.en.warforrayuba.dto.PageDto
import eu.kanade.tachiyomi.extension.en.warforrayuba.dto.RoundDto
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
@ -47,7 +47,7 @@ class WarForRayuba : HttpSource() {
"User-Agent",
"(Android ${Build.VERSION.RELEASE}; " +
"${Build.MANUFACTURER} ${Build.MODEL}) " +
"Tachiyomi/${BuildConfig.VERSION_NAME} " +
"Tachiyomi/${AppInfo.getVersionName()} " +
Build.ID
)
}.build()

View File

@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.ko.jmana
import android.app.Application
import android.content.SharedPreferences
import android.widget.Toast
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.FilterList
@ -201,7 +201,7 @@ class JMana : ConfigurableSource, ParsedHttpSource() {
const val DETAIL_DESCRIPTION = "설명 : "
const val DEFAULT_BASEURL = "https://jmana1.net"
private const val BASE_URL_PREF_TITLE = "Override BaseUrl"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_NAME}"
private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
private const val BASE_URL_PREF_SUMMARY = "For temporary uses. Update extension will erase this setting."
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
}

View File

@ -4,8 +4,8 @@ import android.annotation.SuppressLint
import android.app.Application
import android.content.SharedPreferences
import android.widget.Toast
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
@ -375,7 +375,7 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
private const val BASE_URL_PREF_TITLE = "Override BaseUrl"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_NAME}"
private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
private const val BASE_URL_PREF_SUMMARY = "For temporary uses. Update extension will erase this setting."
// Setting: Experimental Latest Fetcher

View File

@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.ko.toonkor
import android.app.Application
import android.content.SharedPreferences
import android.util.Base64
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.Filter
@ -28,7 +28,7 @@ class Toonkor : ConfigurableSource, ParsedHttpSource() {
private val defaultBaseUrl = "https://tkor.dog"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_NAME}"
private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
override val baseUrl by lazy { getPrefBaseUrl() }

View File

@ -104,7 +104,7 @@ class MangaClub : ParsedHttpSource() {
}
description = "Читайте описание через WebView"
genre = document.select("div.info a[href*=tags]").joinToString(", ") {
it.text().replaceFirst(it.text().first(), it.text().first().toUpperCase()).trim()
it.text().replaceFirstChar { it.toUpperCase() }.trim()
}
}

View File

@ -1,4 +1,3 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

View File

@ -139,7 +139,7 @@ class WuqiManga : ParsedHttpSource(), ConfigurableSource {
val html = document.html()
val packed = Regex("eval(.*?)\\n").find(html)?.groups?.get(1)?.value
val result = Duktape.create().use {
it.evaluate(packed) as String
it.evaluate(packed!!) as String
}
val re2 = Regex("""\{.*\}""")
val imgJsonStr = re2.find(result)?.groups?.get(0)?.value