update ktor

ktor 2.1.3 -> 2.2.1
This commit is contained in:
2022-12-11 20:00:39 +01:00
parent bf6f2d916e
commit 63f5e69094
2 changed files with 5 additions and 1 deletions

View File

@ -596,6 +596,10 @@ object Crunchyroll {
suspend fun datalabIntro(episodeId: String): DatalabIntro {
val datalabIntroEndpoint = "/datalab-intro-v2/$episodeId.json"
/*
* wtf crunchyroll, why do you return an xml error message when some data is missing,
* this is a json endpoint. For fucks sake, return at least a valid json message.
*/
return try {
val response: HttpResponse = requestGet(datalabIntroEndpoint, url = staticUrl)
Json.decodeFromString(response.bodyAsText())