mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 19:11:49 +01:00
fix anilist jsonnull issue (#300)
added chucker to help with debugging stuff upped retrofit version
This commit is contained in:
parent
e83e67d1b5
commit
41c64b7058
@ -134,8 +134,13 @@ dependencies {
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion")
|
||||
implementation("com.squareup.okio:okio:2.6.0")
|
||||
|
||||
//Chucker
|
||||
val chuckerVersion = "3.2.0"
|
||||
debugImplementation ("com.github.ChuckerTeam.Chucker:library:$chuckerVersion")
|
||||
releaseImplementation ("com.github.ChuckerTeam.Chucker:library-no-op:$chuckerVersion")
|
||||
|
||||
// REST
|
||||
val retrofitVersion = "2.7.1"
|
||||
val retrofitVersion = "2.7.2"
|
||||
implementation("com.squareup.retrofit2:retrofit:$retrofitVersion")
|
||||
implementation("com.squareup.retrofit2:converter-gson:$retrofitVersion")
|
||||
|
||||
|
@ -182,7 +182,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
struct["coverImage"]["large"].asString,
|
||||
struct["description"].nullString.orEmpty(),
|
||||
struct["type"].asString,
|
||||
struct["status"].asString,
|
||||
struct["status"].nullString.orEmpty(),
|
||||
date,
|
||||
struct["chapters"].nullInt ?: 0
|
||||
)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package eu.kanade.tachiyomi.network
|
||||
|
||||
import android.content.Context
|
||||
import com.chuckerteam.chucker.api.ChuckerInterceptor
|
||||
import okhttp3.Cache
|
||||
import okhttp3.OkHttpClient
|
||||
import java.io.File
|
||||
@ -16,6 +17,7 @@ class NetworkHelper(context: Context) {
|
||||
val client = OkHttpClient.Builder()
|
||||
.cookieJar(cookieManager)
|
||||
.cache(Cache(cacheDir, cacheSize))
|
||||
.addInterceptor(ChuckerInterceptor(context))
|
||||
.build()
|
||||
|
||||
val cloudflareClient = client.newBuilder()
|
||||
|
Loading…
Reference in New Issue
Block a user