Komga: Don't apply library filter if default libraries are not set (#1323)

This commit is contained in:
beerpsi 2024-02-17 14:34:00 +07:00 committed by GitHub
parent a23ee99097
commit 85c4454a25
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Komga'
extClass = '.KomgaFactory'
extVersionCode = 56
extVersionCode = 57
}
apply from: "$rootDir/common.gradle"

View File

@ -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<LibraryFilter>().isEmpty()) {
if (filterList.filterIsInstance<LibraryFilter>().isEmpty() && defaultLibraries.isNotEmpty()) {
url.addQueryParameter("library_id", defaultLibraries.joinToString(","))
}