Fix Bangumi API response deserialization (fixes #3977)
(cherry picked from commit 95ec9038624c2a89d7bfe7a07c6db2653598075c)
This commit is contained in:
parent
195dbbf1c2
commit
d9b41ce4c5
@ -151,7 +151,7 @@ class BangumiApi(private val client: OkHttpClient, interceptor: BangumiIntercept
|
|||||||
.asObservableSuccess()
|
.asObservableSuccess()
|
||||||
.map { netResponse ->
|
.map { netResponse ->
|
||||||
val resp = netResponse.body?.string()
|
val resp = netResponse.body?.string()
|
||||||
val coll = Json.decodeFromString<Collection>(resp!!)
|
val coll = Json { ignoreUnknownKeys = true }.decodeFromString<Collection>(resp!!)
|
||||||
track.status = coll.status?.id!!
|
track.status = coll.status?.id!!
|
||||||
track.last_chapter_read = coll.ep_status!!
|
track.last_chapter_read = coll.ep_status!!
|
||||||
track
|
track
|
||||||
|
Loading…
x
Reference in New Issue
Block a user