Pepper&Carrot: disable search (#13350)

This commit is contained in:
stevenyomi 2022-09-06 22:11:25 +08:00 committed by GitHub
parent c5a5b47df2
commit 0046749cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Pepper&Carrot'
pkgNameSuffix = 'all.peppercarrot'
extClass = '.PepperCarrot'
extVersionCode = 1
extVersionCode = 2
}
apply from: "$rootDir/common.gradle"

View File

@ -54,6 +54,7 @@ class PepperCarrot : HttpSource(), ConfigurableSource {
override fun getFilterList() = getFilters(preferences)
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
if (query.isNotEmpty()) return Observable.error(Exception("No search"))
if (filters.isNotEmpty()) preferences.saveFrom(filters)
return fetchPopularManga(page)
}