Get statuslist first when parsing tracking
This commit is contained in:
parent
858a5e6eee
commit
b297d580b0
@ -206,13 +206,13 @@ class FollowsHandler(
|
|||||||
|
|
||||||
suspend fun fetchTrackingInfo(url: String): Track {
|
suspend fun fetchTrackingInfo(url: String): Track {
|
||||||
return withIOContext {
|
return withIOContext {
|
||||||
|
val statusListResponse = client.newCall(statusListRequest()).await().parseAs<JsonObject>(MdUtil.jsonParser)
|
||||||
val request = GET(
|
val request = GET(
|
||||||
MdUtil.mangaUrl + "/" + MdUtil.getMangaId(url),
|
MdUtil.mangaUrl + "/" + MdUtil.getMangaId(url),
|
||||||
MdUtil.getAuthHeaders(headers, preferences, mdList),
|
MdUtil.getAuthHeaders(headers, preferences, mdList),
|
||||||
CacheControl.FORCE_NETWORK
|
CacheControl.FORCE_NETWORK
|
||||||
)
|
)
|
||||||
val response = client.newCall(request).await()
|
val response = client.newCall(request).await()
|
||||||
val statusListResponse = client.newCall(statusListRequest()).await().parseAs<JsonObject>(MdUtil.jsonParser)
|
|
||||||
followStatusParse(response, statusListResponse)
|
followStatusParse(response, statusListResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user