Remove usage of okhttp internal variables (#9216)
* Remove usage of okhttp internal variables inaccessable or removed in new version of okhttp * lint * lint :2
This commit is contained in:
parent
3244e3fe53
commit
49ecc98bce
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.IgnisComic'
|
||||
themePkg = 'mangathemesia'
|
||||
baseUrl = 'https://manhuaga.com'
|
||||
overrideVersionCode = 2
|
||||
overrideVersionCode = 3
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,8 @@ package eu.kanade.tachiyomi.extension.en.igniscomic
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.internal.http.HTTP_INTERNAL_SERVER_ERROR
|
||||
import okhttp3.internal.http.HTTP_OK
|
||||
import java.net.HttpURLConnection.HTTP_INTERNAL_ERROR
|
||||
import java.net.HttpURLConnection.HTTP_OK
|
||||
|
||||
class IgnisComic : MangaThemesia(
|
||||
"Ignis Comic",
|
||||
@ -13,7 +13,7 @@ class IgnisComic : MangaThemesia(
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor { chain ->
|
||||
val response = chain.proceed(chain.request())
|
||||
response.takeIf { it.code < HTTP_INTERNAL_SERVER_ERROR }
|
||||
response.takeIf { it.code < HTTP_INTERNAL_ERROR }
|
||||
?: response.newBuilder()
|
||||
.code(HTTP_OK)
|
||||
.build()
|
||||
|
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Mangamo'
|
||||
extClass = '.Mangamo'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,6 @@ import eu.kanade.tachiyomi.network.POST
|
||||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import okhttp3.internal.EMPTY_HEADERS
|
||||
|
||||
class MangamoAuth(
|
||||
private val helper: MangamoHelper,
|
||||
@ -53,8 +52,7 @@ class MangamoAuth(
|
||||
val googleIdentityResponse = client.newCall(
|
||||
POST(
|
||||
"https://identitytoolkit.googleapis.com/v1/accounts:signInWithCustomToken?key=${MangamoConstants.FIREBASE_API_KEY}",
|
||||
EMPTY_HEADERS,
|
||||
"{\"token\":\"$customToken\",\"returnSecureToken\":true}".toRequestBody(),
|
||||
body = "{\"token\":\"$customToken\",\"returnSecureToken\":true}".toRequestBody(),
|
||||
),
|
||||
).execute()
|
||||
|
||||
@ -97,8 +95,7 @@ class MangamoAuth(
|
||||
val googleIdentityResponse = client.newCall(
|
||||
POST(
|
||||
"https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=${MangamoConstants.FIREBASE_API_KEY}",
|
||||
EMPTY_HEADERS,
|
||||
"{\"returnSecureToken\":true}".toRequestBody(),
|
||||
body = "{\"returnSecureToken\":true}".toRequestBody(),
|
||||
),
|
||||
).execute()
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Gekkou Scans'
|
||||
extClass = '.GekkouScans'
|
||||
extVersionCode = 42
|
||||
extVersionCode = 43
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@ import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import okhttp3.internal.http.HTTP_FORBIDDEN
|
||||
import java.io.IOException
|
||||
import java.net.HttpURLConnection.HTTP_FORBIDDEN
|
||||
|
||||
class GekkouScans : HttpSource() {
|
||||
|
||||
|
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.ImperioDaBritannia'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://imperiodabritannia.com'
|
||||
overrideVersionCode = 3
|
||||
overrideVersionCode = 4
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,8 @@ package eu.kanade.tachiyomi.extension.pt.imperiodabritannia
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.internal.http.HTTP_FORBIDDEN
|
||||
import okhttp3.internal.http.HTTP_OK
|
||||
import java.net.HttpURLConnection.HTTP_FORBIDDEN
|
||||
import java.net.HttpURLConnection.HTTP_OK
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Taiyō'
|
||||
extClass = '.Taiyo'
|
||||
extVersionCode = 7
|
||||
extVersionCode = 8
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -32,13 +32,13 @@ import okhttp3.MediaType.Companion.toMediaType
|
||||
import okhttp3.Request
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import okhttp3.Response
|
||||
import okhttp3.internal.http.HTTP_FORBIDDEN
|
||||
import okhttp3.internal.http.HTTP_UNAUTHORIZED
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import org.jsoup.select.Elements
|
||||
import rx.Observable
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.net.HttpURLConnection.HTTP_FORBIDDEN
|
||||
import java.net.HttpURLConnection.HTTP_UNAUTHORIZED
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user