Erofus: encode search (#8726)

This commit is contained in:
Vetle Ledaal 2025-05-04 15:31:26 +02:00 committed by Draff
parent e5f3f65c25
commit 8e13bcd5b6
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.Erofus' extClass = '.Erofus'
themePkg = 'eromuse' themePkg = 'eromuse'
baseUrl = 'https://www.erofus.com' baseUrl = 'https://www.erofus.com'
overrideVersionCode = 1 overrideVersionCode = 2
isNsfw = true isNsfw = true
} }

View File

@ -27,7 +27,12 @@ class Erofus : EroMuse("Erofus", "https://www.erofus.com") {
if (query.isNotBlank()) { if (query.isNotBlank()) {
// TODO possibly add genre search if a decent list of them can be built // TODO possibly add genre search if a decent list of them can be built
pageStack.addLast(StackItem("$baseUrl/?search=$query&sort=$currentSortingMode&page=1", SEARCH_RESULTS_OR_BASE)) val url = baseUrl.toHttpUrl().newBuilder()
.addQueryParameter("search", query)
.addQueryParameter("sort", currentSortingMode)
.addQueryParameter("page", "1")
pageStack.addLast(StackItem(url.toString(), SEARCH_RESULTS_OR_BASE))
} else { } else {
val albumFilter = filterList.filterIsInstance<AlbumFilter>().first().selection() val albumFilter = filterList.filterIsInstance<AlbumFilter>().first().selection()
val url = (baseUrl + albumFilter.pathSegments).toHttpUrl().newBuilder() val url = (baseUrl + albumFilter.pathSegments).toHttpUrl().newBuilder()