(cherry picked from commit 58085336a5399a066b04baf679445bb0e047cc5d)
This commit is contained in:
AntsyLich 2024-01-22 20:20:11 +06:00 committed by Jobobby04
parent ca944f3f38
commit b210491db5
2 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,10 @@ class BangumiInterceptor(private val bangumi: Bangumi) : Interceptor {
}
return originalRequest.newBuilder()
.header("User-Agent", "jobobby04/TachiyomiSY/v${BuildConfig.VERSION_NAME} (Android) (http://github.com/jobobby04/tachiyomisy)")
.header(
"User-Agent",
"jobobby04/TachiyomiSY/v${BuildConfig.VERSION_NAME} (Android) (http://github.com/jobobby04/tachiyomisy)",
)
.apply {
if (originalRequest.method == "GET") {
val newUrl = originalRequest.url.newBuilder()

View File

@ -51,7 +51,9 @@ class KomgaApi(
}
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 {
with(json) {
if (url.contains("/api/v1/series/")) {