From 860dd32a530ca2a58083469e1e69f078698899b4 Mon Sep 17 00:00:00 2001 From: dragonx943 Date: Thu, 11 Sep 2025 20:35:26 +0700 Subject: [PATCH] =?UTF-8?q?G=C3=B3c=20Truy=E1=BB=87n=20Tranh=20Vui:=20Fix?= =?UTF-8?q?=20warns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-branch.yml | 2 +- .github/workflows/test-parsers.yml | 2 +- gradle.properties | 1 + .../kotatsu/parsers/site/vi/GocTruyenTranhVui.kt | 9 ++++----- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-branch.yml b/.github/workflows/test-branch.yml index d8d1506d..646a7be8 100644 --- a/.github/workflows/test-branch.yml +++ b/.github/workflows/test-branch.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Gradle 📦 uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2 with: - cache-read-only: true + cache-read-only: false - name: Compile parsers 🚀 run: ./gradlew compileKotlin diff --git a/.github/workflows/test-parsers.yml b/.github/workflows/test-parsers.yml index fd3d457a..95599beb 100644 --- a/.github/workflows/test-parsers.yml +++ b/.github/workflows/test-parsers.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Gradle 📦 uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2 with: - cache-read-only: true + cache-read-only: false - name: Compile parsers 🚀 run: ./gradlew compileKotlin diff --git a/gradle.properties b/gradle.properties index 1b62871d..62441fd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,3 +7,4 @@ org.gradle.configureondemand=true org.gradle.parallel=true org.gradle.caching=true org.gradle.configuration-cache=true +org.gradle.workers.max=5 diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/vi/GocTruyenTranhVui.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/vi/GocTruyenTranhVui.kt index 21882bee..371c2990 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/vi/GocTruyenTranhVui.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/vi/GocTruyenTranhVui.kt @@ -16,7 +16,8 @@ import org.json.JSONObject import java.util.* @MangaSourceParser("GOCTRUYENTRANHVUI", "Góc Truyện Tranh Vui", "vi") -internal class GocTruyenTranhVui(context: MangaLoaderContext) : PagedMangaParser(context, MangaParserSource.GOCTRUYENTRANHVUI, 50) { +internal class GocTruyenTranhVui(context: MangaLoaderContext): + PagedMangaParser(context, MangaParserSource.GOCTRUYENTRANHVUI, 50) { override val configKeyDomain = ConfigKey.Domain("goctruyentranhvui17.com") private val apiUrl by lazy { "https://$domain/api/v2" } @@ -144,7 +145,7 @@ internal class GocTruyenTranhVui(context: MangaLoaderContext) : PagedMangaParser source = source ) } - } catch (e: Exception) { + } catch (_: Exception) { emptyList() }.reversed() @@ -174,9 +175,7 @@ internal class GocTruyenTranhVui(context: MangaLoaderContext) : PagedMangaParser override suspend fun getPages(chapter: MangaChapter): List { enforceRateLimit() - val responseBody = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).body?.string() - ?: throw Exception("Response body is null for chapter page") - + val responseBody = webClient.httpGet(chapter.url.toAbsoluteUrl(domain)).body.string() val chapterJsonRaw = responseBody.substringAfter("chapterJson: `", "").substringBefore("`", "") val imageUrls: List