diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt index 0a43f506e..fe526274d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt @@ -62,7 +62,8 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI suspend fun search(query: String): List { return withIOContext { val url = "$baseApiUrl/manga".toUri().buildUpon() - .appendQueryParameter("q", query) + // MAL API throws a 400 when the query is over 64 characters... + .appendQueryParameter("q", query.take(64)) .appendQueryParameter("nsfw", "true") .build() authClient.newCall(GET(url.toString()))