Komga: Don't apply library filter if default libraries are not set (#1323)
This commit is contained in:
parent
a799bf8a5c
commit
3e9c022f6a
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Komga'
|
extName = 'Komga'
|
||||||
extClass = '.KomgaFactory'
|
extClass = '.KomgaFactory'
|
||||||
extVersionCode = 56
|
extVersionCode = 57
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -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 url = "$baseUrl/api/v1/$type?search=$query&page=${page - 1}&deleted=false".toHttpUrl().newBuilder()
|
||||||
val filterList = filters.ifEmpty { getFilterList() }
|
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(","))
|
url.addQueryParameter("library_id", defaultLibraries.joinToString(","))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue