From 3e9c022f6a6e774d945cc558d6d3614edde79780 Mon Sep 17 00:00:00 2001 From: beerpsi <92439990+beerpiss@users.noreply.github.com> Date: Sat, 17 Feb 2024 14:34:00 +0700 Subject: [PATCH] Komga: Don't apply library filter if default libraries are not set (#1323) --- src/all/komga/build.gradle | 2 +- .../komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/all/komga/build.gradle b/src/all/komga/build.gradle index bcbf88b2a..89d5d1635 100644 --- a/src/all/komga/build.gradle +++ b/src/all/komga/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Komga' extClass = '.KomgaFactory' - extVersionCode = 56 + extVersionCode = 57 } apply from: "$rootDir/common.gradle" diff --git a/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt b/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt index 3689d9679..d452c0646 100644 --- a/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt +++ b/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt @@ -139,8 +139,9 @@ open class Komga(private val suffix: String = "") : ConfigurableSource, Unmetere val url = "$baseUrl/api/v1/$type?search=$query&page=${page - 1}&deleted=false".toHttpUrl().newBuilder() val filterList = filters.ifEmpty { getFilterList() } + val defaultLibraries = defaultLibraries - if (filterList.filterIsInstance().isEmpty()) { + if (filterList.filterIsInstance().isEmpty() && defaultLibraries.isNotEmpty()) { url.addQueryParameter("library_id", defaultLibraries.joinToString(",")) }