Skip to content

Commit

Permalink
Fix import.
Browse files Browse the repository at this point in the history
  • Loading branch information
StageGuard committed Feb 13, 2025
1 parent 67d8c9b commit f335e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions datasource/bangumi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ kotlin {
api(libs.kotlinx.coroutines.core)
api(libs.androidx.collection)

implementation(projects.utils.coroutines)
implementation(projects.utils.serialization)
implementation(libs.ktor.client.logging)
implementation(libs.ktor.client.content.negotiation)
Expand Down
5 changes: 3 additions & 2 deletions datasource/bangumi/src/commonMain/kotlin/BangumiClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import me.him188.ani.datasources.bangumi.models.subjects.BangumiLegacySubject
import me.him188.ani.datasources.bangumi.models.subjects.BangumiSubjectImageSize
import me.him188.ani.datasources.bangumi.next.apis.EpisodeBangumiNextApi
import me.him188.ani.datasources.bangumi.next.apis.SubjectBangumiNextApi
import me.him188.ani.utils.coroutines.IO_
import me.him188.ani.utils.ktor.ApiInvoker
import me.him188.ani.utils.ktor.HttpTokenChecker
import me.him188.ani.utils.ktor.ScopedHttpClient
Expand Down Expand Up @@ -158,7 +159,7 @@ class BangumiClientImpl(
ratings: List<String>?,
ranks: List<String>?,
nsfw: Boolean?,
): List<BangumiSearchSubjectNewApi>? = withContext(Dispatchers.IO) {
): List<BangumiSearchSubjectNewApi>? = withContext(Dispatchers.IO_) {
val resp = httpClient.post("$BANGUMI_API_HOST/v0/search/subjects") {
parameter("offset", offset)
parameter("limit", limit)
Expand Down Expand Up @@ -206,7 +207,7 @@ class BangumiClientImpl(
responseGroup: BangumiSubjectImageSize?,
start: Int?,
maxResults: Int?
): Paged<BangumiLegacySubject> = withContext(Dispatchers.IO) {
): Paged<BangumiLegacySubject> = withContext(Dispatchers.IO_) {
val resp = httpClient.get("$BANGUMI_API_HOST/search/subject".plus("/")) {
url {
appendPathSegments(keyword)
Expand Down

0 comments on commit f335e38

Please sign in to comment.