Update to extensions-lib 1.3 (#11298)
This commit is contained in:
parent
f0897b4c5a
commit
67263a106b
|
@ -31,7 +31,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 11
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
run: |
|
run: |
|
||||||
|
@ -70,7 +70,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 11
|
||||||
|
|
||||||
- name: Copy CI gradle.properties
|
- name: Copy CI gradle.properties
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 11
|
||||||
|
|
||||||
- name: Copy CI files
|
- name: Copy CI files
|
||||||
run: |
|
run: |
|
||||||
|
@ -93,7 +93,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 11
|
||||||
|
|
||||||
- name: Copy CI files
|
- name: Copy CI files
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -93,7 +93,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. |
|
| `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). |
|
| `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. |
|
| `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. |
|
| `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`.
|
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`.
|
||||||
|
|
|
@ -22,7 +22,7 @@ android {
|
||||||
targetSdkVersion AndroidConfig.targetSdk
|
targetSdkVersion AndroidConfig.targetSdk
|
||||||
applicationIdSuffix pkgNameSuffix
|
applicationIdSuffix pkgNameSuffix
|
||||||
versionCode extVersionCode
|
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")
|
setProperty("archivesBaseName", "tachiyomi-$pkgNameSuffix-v$versionName")
|
||||||
def readmes = project.projectDir.listFiles({ File file ->
|
def readmes = project.projectDir.listFiles({ File file ->
|
||||||
file.name.equals("README.md") ||
|
file.name.equals("README.md") ||
|
||||||
|
|
|
@ -1,29 +1,32 @@
|
||||||
[versions]
|
[versions]
|
||||||
kotlin_version = "1.4.32"
|
kotlin_version = "1.6.10"
|
||||||
coroutines_version = "1.4.3"
|
coroutines_version = "1.6.0"
|
||||||
|
serialization_version = "1.3.2"
|
||||||
|
|
||||||
[libraries]
|
[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-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-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-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-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization_version" }
|
||||||
kotlin-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.2.0" }
|
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-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" }
|
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines_version" }
|
||||||
|
|
||||||
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
|
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
|
||||||
jsoup = { module = "org.jsoup:jsoup", version = "1.13.1" }
|
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" }
|
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "4.9.1" }
|
||||||
rxandroid = { module = "io.reactivex:rxandroid", version = "1.2.1" }
|
rxandroid = { module = "io.reactivex:rxandroid", version = "1.2.1" }
|
||||||
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
|
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
|
||||||
|
|
||||||
[bundles]
|
[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"]
|
coroutines = ["coroutines-core", "coroutines-android"]
|
||||||
reactivex = ["rxandroid"]
|
reactivex = ["rxandroid"]
|
||||||
|
|
|
@ -20,6 +20,12 @@ repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
compileOnly {
|
||||||
|
isCanBeResolved = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.bundles.common)
|
compileOnly(libs.bundles.common)
|
||||||
}
|
}
|
||||||
|
@ -28,7 +34,8 @@ tasks {
|
||||||
val generateExtensions by registering {
|
val generateExtensions by registering {
|
||||||
doLast {
|
doLast {
|
||||||
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
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(
|
listOf(
|
||||||
configurations.androidApis.get().asFileTree.first().absolutePath, // android.jar path
|
configurations.androidApis.get().asFileTree.first().absolutePath, // android.jar path
|
||||||
"$projectDir/build/intermediates/aar_main_jar/debug/classes.jar" // jar made from this module
|
"$projectDir/build/intermediates/aar_main_jar/debug/classes.jar" // jar made from this module
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.all.foolslidecustomizable
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.preference.EditTextPreference
|
import androidx.preference.EditTextPreference
|
||||||
import androidx.preference.PreferenceScreen
|
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.multisrc.foolslide.FoolSlide
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class FoolSlideCustomizable : FoolSlide("FoolSlide Customizable", "", "other") {
|
||||||
companion object {
|
companion object {
|
||||||
private const val DEFAULT_BASEURL = "https://127.0.0.1"
|
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 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 BASE_URL_PREF_SUMMARY = "Connect to a designated FoolSlide server"
|
||||||
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
|
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.SharedPreferences
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.preference.EditTextPreference
|
import androidx.preference.EditTextPreference
|
||||||
import androidx.preference.PreferenceScreen
|
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.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
@ -231,7 +231,7 @@ class NeoxScanlator :
|
||||||
private const val REFERER = "https://google.com/"
|
private const val REFERER = "https://google.com/"
|
||||||
|
|
||||||
private const val DEFAULT_BASE_URL = "https://neoxscans.net"
|
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_TITLE = "URL da fonte"
|
||||||
private const val BASE_URL_PREF_SUMMARY = "Para uso temporário. Quando você atualizar a " +
|
private const val BASE_URL_PREF_SUMMARY = "Para uso temporário. Quando você atualizar a " +
|
||||||
"extensão, esta configuração será apagada."
|
"extensão, esta configuração será apagada."
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.app.Application
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.PreferenceScreen
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
|
@ -31,7 +31,7 @@ abstract class BakkinReaderX(
|
||||||
|
|
||||||
private val userAgent = "Mozilla/5.0 (" +
|
private val userAgent = "Mozilla/5.0 (" +
|
||||||
"Android ${Build.VERSION.RELEASE}; Mobile) " +
|
"Android ${Build.VERSION.RELEASE}; Mobile) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME}"
|
"Tachiyomi/${AppInfo.getVersionName()}"
|
||||||
|
|
||||||
protected val preferences by lazy {
|
protected val preferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)!!
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)!!
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.comicake
|
package eu.kanade.tachiyomi.multisrc.comicake
|
||||||
|
|
||||||
import android.os.Build
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -34,7 +34,7 @@ abstract class ComiCake(
|
||||||
|
|
||||||
private val userAgent = "Mozilla/5.0 (" +
|
private val userAgent = "Mozilla/5.0 (" +
|
||||||
"Android ${Build.VERSION.RELEASE}; Mobile) " +
|
"Android ${Build.VERSION.RELEASE}; Mobile) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME}"
|
"Tachiyomi/${AppInfo.getVersionName()}"
|
||||||
|
|
||||||
override fun headersBuilder() = Headers.Builder().apply {
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
add("User-Agent", userAgent)
|
add("User-Agent", userAgent)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.SharedPreferences
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.PreferenceScreen
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservable
|
import eu.kanade.tachiyomi.network.asObservable
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
|
@ -40,7 +40,7 @@ abstract class Guya(
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
"(Android ${Build.VERSION.RELEASE}; " +
|
"(Android ${Build.VERSION.RELEASE}; " +
|
||||||
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME} ${Build.ID}"
|
"Tachiyomi/${AppInfo.getVersionName()} ${Build.ID}"
|
||||||
)
|
)
|
||||||
|
|
||||||
private val scanlators: ScanlatorStore = ScanlatorStore()
|
private val scanlators: ScanlatorStore = ScanlatorStore()
|
||||||
|
|
|
@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build.VERSION
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -36,7 +36,7 @@ abstract class MangAdventure(
|
||||||
/** A user agent representing Tachiyomi. */
|
/** A user agent representing Tachiyomi. */
|
||||||
private val userAgent = "Mozilla/5.0 " +
|
private val userAgent = "Mozilla/5.0 " +
|
||||||
"(Android ${VERSION.RELEASE}; Mobile) " +
|
"(Android ${VERSION.RELEASE}; Mobile) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME}"
|
"Tachiyomi/${AppInfo.getVersionName()}"
|
||||||
|
|
||||||
/** The URI of the site's API. */
|
/** The URI of the site's API. */
|
||||||
private val apiUri by lazy {
|
private val apiUri by lazy {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.extension.all.cubari
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.os.Build
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -42,7 +42,7 @@ open class Cubari(override val lang: String) : HttpSource() {
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
"(Android ${Build.VERSION.RELEASE}; " +
|
"(Android ${Build.VERSION.RELEASE}; " +
|
||||||
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME} " +
|
"Tachiyomi/${AppInfo.getVersionName()} " +
|
||||||
Build.ID
|
Build.ID
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ open class Hitomi(override val lang: String, private val nozomiLang: String) : H
|
||||||
gg = response.body!!.string()
|
gg = response.body!!.string()
|
||||||
}
|
}
|
||||||
val duktape = Duktape.create()
|
val duktape = Duktape.create()
|
||||||
duktape.evaluate(gg)
|
duktape.evaluate(gg!!)
|
||||||
|
|
||||||
val str = response.body!!.string()
|
val str = response.body!!.string()
|
||||||
val json = json.decodeFromString<HitomiChapterDto>(str.removePrefix("var galleryinfo = "))
|
val json = json.decodeFromString<HitomiChapterDto>(str.removePrefix("var galleryinfo = "))
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.util.Log
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.preference.EditTextPreference
|
import androidx.preference.EditTextPreference
|
||||||
import androidx.preference.MultiSelectListPreference
|
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.AuthenticationDto
|
||||||
import eu.kanade.tachiyomi.extension.all.kavita.dto.ChapterDto
|
import eu.kanade.tachiyomi.extension.all.kavita.dto.ChapterDto
|
||||||
import eu.kanade.tachiyomi.extension.all.kavita.dto.MangaFormat
|
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 {
|
override fun headersBuilder(): Headers.Builder {
|
||||||
if (jwtToken.isEmpty()) throw LoginErrorException("401 Error\nOPDS address got modified or is incorrect")
|
if (jwtToken.isEmpty()) throw LoginErrorException("401 Error\nOPDS address got modified or is incorrect")
|
||||||
return 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("Content-Type", "application/json")
|
||||||
.add("Authorization", "Bearer $jwtToken")
|
.add("Authorization", "Bearer $jwtToken")
|
||||||
}
|
}
|
||||||
private fun setupLoginHeaders(): Headers.Builder {
|
private fun setupLoginHeaders(): Headers.Builder {
|
||||||
return 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("Content-Type", "application/json")
|
||||||
.add("Authorization", "Bearer $jwtToken")
|
.add("Authorization", "Bearer $jwtToken")
|
||||||
}
|
}
|
||||||
|
@ -1147,13 +1147,13 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, HttpSource()
|
||||||
.parseAs<ServerInfoDto>()
|
.parseAs<ServerInfoDto>()
|
||||||
Log.e(
|
Log.e(
|
||||||
LOG_TAG,
|
LOG_TAG,
|
||||||
"Extension version: code=${BuildConfig.VERSION_CODE} name=${BuildConfig.VERSION_NAME}" +
|
"Extension version: code=${AppInfo.getVersionCode()} name=${AppInfo.getVersionName()}" +
|
||||||
" - - Kavita version: ${serverInfoDto.kavitaVersion}"
|
" - - Kavita version: ${serverInfoDto.kavitaVersion}"
|
||||||
) // this is not a real error. Using this so it gets printed in dump logs if there's any error
|
) // this is not a real error. Using this so it gets printed in dump logs if there's any error
|
||||||
} catch (e: EmptyRequestBody) {
|
} 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) {
|
} 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
|
try { // Load Filters
|
||||||
// Genres
|
// Genres
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.SharedPreferences
|
||||||
import android.text.InputType
|
import android.text.InputType
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.widget.Toast
|
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.AuthorDto
|
||||||
import eu.kanade.tachiyomi.extension.all.komga.dto.BookDto
|
import eu.kanade.tachiyomi.extension.all.komga.dto.BookDto
|
||||||
import eu.kanade.tachiyomi.extension.all.komga.dto.CollectionDto
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.Filter
|
||||||
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
|
||||||
|
@ -44,7 +45,7 @@ import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.Locale
|
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 =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/api/v1/series?page=${page - 1}&deleted=false", headers)
|
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 =
|
override fun headersBuilder(): Headers.Builder =
|
||||||
Headers.Builder()
|
Headers.Builder()
|
||||||
.add("User-Agent", "TachiyomiKomga/${BuildConfig.VERSION_NAME}")
|
.add("User-Agent", "TachiyomiKomga/${AppInfo.getVersionName()}")
|
||||||
|
|
||||||
private val preferences: SharedPreferences by lazy {
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.text.InputType
|
import android.text.InputType
|
||||||
import android.widget.Toast
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
|
@ -212,7 +212,7 @@ class Mango : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder =
|
override fun headersBuilder(): Headers.Builder =
|
||||||
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 {
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.ca.fansubscat
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -37,7 +37,7 @@ class FansubsCat : HttpSource() {
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
override fun headersBuilder(): Headers.Builder = Headers.Builder()
|
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
|
override val client: OkHttpClient = network.client
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.vgperson
|
package eu.kanade.tachiyomi.extension.en.vgperson
|
||||||
|
|
||||||
import android.os.Build.VERSION
|
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.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -29,7 +29,7 @@ class Vgperson : ParsedHttpSource() {
|
||||||
|
|
||||||
private val userAgent = "Mozilla/5.0 " +
|
private val userAgent = "Mozilla/5.0 " +
|
||||||
"(Android ${VERSION.RELEASE}; Mobile) " +
|
"(Android ${VERSION.RELEASE}; Mobile) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME}"
|
"Tachiyomi/${AppInfo.getVersionName()}"
|
||||||
|
|
||||||
override fun headersBuilder() = Headers.Builder().apply {
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
add("User-Agent", userAgent)
|
add("User-Agent", userAgent)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.warforrayuba
|
package eu.kanade.tachiyomi.extension.en.warforrayuba
|
||||||
|
|
||||||
import android.os.Build
|
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.PageDto
|
||||||
import eu.kanade.tachiyomi.extension.en.warforrayuba.dto.RoundDto
|
import eu.kanade.tachiyomi.extension.en.warforrayuba.dto.RoundDto
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
|
@ -47,7 +47,7 @@ class WarForRayuba : HttpSource() {
|
||||||
"User-Agent",
|
"User-Agent",
|
||||||
"(Android ${Build.VERSION.RELEASE}; " +
|
"(Android ${Build.VERSION.RELEASE}; " +
|
||||||
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
"${Build.MANUFACTURER} ${Build.MODEL}) " +
|
||||||
"Tachiyomi/${BuildConfig.VERSION_NAME} " +
|
"Tachiyomi/${AppInfo.getVersionName()} " +
|
||||||
Build.ID
|
Build.ID
|
||||||
)
|
)
|
||||||
}.build()
|
}.build()
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.ko.jmana
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.widget.Toast
|
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.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -201,7 +201,7 @@ class JMana : ConfigurableSource, ParsedHttpSource() {
|
||||||
const val DETAIL_DESCRIPTION = "설명 : "
|
const val DETAIL_DESCRIPTION = "설명 : "
|
||||||
const val DEFAULT_BASEURL = "https://jmana1.net"
|
const val DEFAULT_BASEURL = "https://jmana1.net"
|
||||||
private const val BASE_URL_PREF_TITLE = "Override BaseUrl"
|
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 BASE_URL_PREF_SUMMARY = "For temporary uses. Update extension will erase this setting."
|
||||||
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
|
private const val RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ import android.annotation.SuppressLint
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
|
import eu.kanade.tachiyomi.AppInfo
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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 RESTART_TACHIYOMI = "Restart Tachiyomi to apply new setting."
|
||||||
|
|
||||||
private const val BASE_URL_PREF_TITLE = "Override BaseUrl"
|
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 BASE_URL_PREF_SUMMARY = "For temporary uses. Update extension will erase this setting."
|
||||||
|
|
||||||
// Setting: Experimental Latest Fetcher
|
// Setting: Experimental Latest Fetcher
|
||||||
|
|
|
@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.ko.toonkor
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.AppInfo
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
|
@ -28,7 +28,7 @@ class Toonkor : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
private val defaultBaseUrl = "https://tkor.dog"
|
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() }
|
override val baseUrl by lazy { getPrefBaseUrl() }
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ class MangaClub : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
description = "Читайте описание через WebView"
|
description = "Читайте описание через WebView"
|
||||||
genre = document.select("div.info a[href*=tags]").joinToString(", ") {
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ class WuqiManga : ParsedHttpSource() {
|
||||||
val html = document.html()
|
val html = document.html()
|
||||||
val packed = Regex("eval(.*?)\\n").find(html)?.groups?.get(1)?.value
|
val packed = Regex("eval(.*?)\\n").find(html)?.groups?.get(1)?.value
|
||||||
val result = Duktape.create().use {
|
val result = Duktape.create().use {
|
||||||
it.evaluate(packed) as String
|
it.evaluate(packed!!) as String
|
||||||
}
|
}
|
||||||
val re2 = Regex("""\{.*\}""")
|
val re2 = Regex("""\{.*\}""")
|
||||||
val imgJsonStr = re2.find(result)?.groups?.get(0)?.value
|
val imgJsonStr = re2.find(result)?.groups?.get(0)?.value
|
||||||
|
|
Loading…
Reference in New Issue