mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Lint
This commit is contained in:
parent
89ea0a271b
commit
58085336a5
2 changed files with 7 additions and 3 deletions
|
@ -4,7 +4,6 @@ import eu.kanade.tachiyomi.BuildConfig
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
|
||||||
|
@ -32,7 +31,10 @@ class BangumiInterceptor(private val bangumi: Bangumi) : Interceptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
return originalRequest.newBuilder()
|
return originalRequest.newBuilder()
|
||||||
.header("User-Agent", "antsylich/Mihon/v${BuildConfig.VERSION_NAME} (Android) (http://github.com/mihonapp/mihon)")
|
.header(
|
||||||
|
"User-Agent",
|
||||||
|
"antsylich/Mihon/v${BuildConfig.VERSION_NAME} (Android) (http://github.com/mihonapp/mihon)",
|
||||||
|
)
|
||||||
.apply {
|
.apply {
|
||||||
if (originalRequest.method == "GET") {
|
if (originalRequest.method == "GET") {
|
||||||
val newUrl = originalRequest.url.newBuilder()
|
val newUrl = originalRequest.url.newBuilder()
|
||||||
|
|
|
@ -51,7 +51,9 @@ class KomgaApi(
|
||||||
}
|
}
|
||||||
|
|
||||||
val progress = client
|
val progress = client
|
||||||
.newCall(GET("${url.replace("/api/v1/series/", "/api/v2/series/")}/read-progress/tachiyomi", headers))
|
.newCall(
|
||||||
|
GET("${url.replace("/api/v1/series/", "/api/v2/series/")}/read-progress/tachiyomi", headers),
|
||||||
|
)
|
||||||
.awaitSuccess().let {
|
.awaitSuccess().let {
|
||||||
with(json) {
|
with(json) {
|
||||||
if (url.contains("/api/v1/series/")) {
|
if (url.contains("/api/v1/series/")) {
|
||||||
|
|
Loading…
Reference in a new issue