From 6af0eb4068ad09be30f017f3fae1859a56b5483c Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 23 Oct 2020 18:02:48 -0400 Subject: [PATCH] Fix Shikimori login (closes #3966) --- .../kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt index 9473cafe5..ed9e83439 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt @@ -157,7 +157,7 @@ class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInter if (responseBody.isEmpty()) { throw Exception("Null Response") } - Json.decodeFromString(responseBody) + Json { ignoreUnknownKeys = true }.decodeFromString(responseBody) } } @@ -177,9 +177,9 @@ class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInter private const val clientSecret = "229942c742dd4cde803125d17d64501d91c0b12e14cb1e5120184d77d67024c0" private const val baseUrl = "https://shikimori.one" - private const val apiUrl = "https://shikimori.one/api" - private const val oauthUrl = "https://shikimori.one/oauth/token" - private const val loginUrl = "https://shikimori.one/oauth/authorize" + private const val apiUrl = "$baseUrl/api" + private const val oauthUrl = "$baseUrl/oauth/token" + private const val loginUrl = "$baseUrl/oauth/authorize" private const val redirectUrl = "tachiyomi://shikimori-auth" private const val baseMangaUrl = "$apiUrl/mangas"