Added mirror selector

Developing new Downloader under xyz.quaver.pupil.util.download
This commit is contained in:
Pupil
2020-01-24 15:11:35 +09:00
parent 37123a2cd5
commit c204353220
27 changed files with 651 additions and 92 deletions

View File

@@ -16,9 +16,11 @@
package xyz.quaver.hitomi
import kotlinx.serialization.Serializable
import org.jsoup.Jsoup
import java.net.URLDecoder
@Serializable
data class Gallery(
val related: List<Int>,
val langList: List<Pair<String, String>>,

View File

@@ -26,7 +26,7 @@ fun doSearch(query: String, sortByPopularity: Boolean = false) : List<Int> {
val terms = query
.trim()
.replace(Regex("""^\?"""), "")
.toLowerCase()
.toLowerCase(Locale.US)
.split(Regex("\\s+"))
.map {
it.replace('_', ' ')