fix!: MAL token serialization

This commit is contained in:
rebelonion 2024-02-03 23:36:49 -06:00
parent b4487159ed
commit eade3ce341
2 changed files with 7 additions and 3 deletions

View file

@ -95,6 +95,10 @@ object MAL {
@SerialName("expires_in") var expiresIn: Long, @SerialName("expires_in") var expiresIn: Long,
@SerialName("access_token") val accessToken: String, @SerialName("access_token") val accessToken: String,
@SerialName("refresh_token") val refreshToken: String, @SerialName("refresh_token") val refreshToken: String,
) : java.io.Serializable ) : java.io.Serializable {
companion object {
private const val serialVersionUID = 1L
}
}
} }

View file

@ -31,12 +31,12 @@ class NetworkHelper(
CloudflareInterceptor(context, cookieJar, ::defaultUserAgentProvider) CloudflareInterceptor(context, cookieJar, ::defaultUserAgentProvider)
} }
private fun baseClientBuilder(callTimout: Int = 2): OkHttpClient.Builder { private fun baseClientBuilder(callTimeout: Int = 2): OkHttpClient.Builder {
val builder = OkHttpClient.Builder() val builder = OkHttpClient.Builder()
.cookieJar(cookieJar) .cookieJar(cookieJar)
.connectTimeout(30, TimeUnit.SECONDS) .connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS) .readTimeout(30, TimeUnit.SECONDS)
.callTimeout(callTimout.toLong(), TimeUnit.MINUTES) .callTimeout(callTimeout.toLong(), TimeUnit.MINUTES)
.addInterceptor(UncaughtExceptionInterceptor()) .addInterceptor(UncaughtExceptionInterceptor())
.addInterceptor(userAgentInterceptor) .addInterceptor(userAgentInterceptor)