Don't add custom User Agent for MAL

Closes #298

(cherry picked from commit 7974a1fc0c2b0e237d5704a033a60ec0fd60cdbc)
This commit is contained in:
AntsyLich 2024-02-26 21:19:55 +06:00 committed by Cuong M. Tran
parent 9529104551
commit 9eb420cf42
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -1,6 +1,5 @@
package eu.kanade.tachiyomi.data.track.myanimelist
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.network.parseAs
import kotlinx.serialization.json.Json
import okhttp3.Interceptor
@ -32,7 +31,8 @@ class MyAnimeListInterceptor(private val myanimelist: MyAnimeList) : Interceptor
// Add the authorization header to the original request
val authRequest = originalRequest.newBuilder()
.addHeader("Authorization", "Bearer ${oauth!!.access_token}")
.header("User-Agent", "Komikku v${BuildConfig.VERSION_NAME} (${BuildConfig.APPLICATION_ID})")
// TODO(antsy): Add back custom user agent when they stop blocking us for no apparent reason
// .header("User-Agent", "Komikku v${BuildConfig.VERSION_NAME} (${BuildConfig.APPLICATION_ID})")
.build()
return chain.proceed(authRequest)