Add Manhuascan.us (#3965)
This commit is contained in:
parent
f99c22a81d
commit
9fb6efe03d
10
src/en/manhuascanus/build.gradle
Normal file
10
src/en/manhuascanus/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
ext {
|
||||
extName = 'Manhuascan.us'
|
||||
extClass = '.ManhuascanUs'
|
||||
themePkg = 'mangathemesia'
|
||||
baseUrl = 'https://manhuascan.us'
|
||||
overrideVersionCode = 0
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/en/manhuascanus/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/en/manhuascanus/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
src/en/manhuascanus/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/en/manhuascanus/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
src/en/manhuascanus/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/en/manhuascanus/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
src/en/manhuascanus/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/en/manhuascanus/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
src/en/manhuascanus/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/en/manhuascanus/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,49 @@
|
||||
package eu.kanade.tachiyomi.extension.en.manhuascanus
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.Request
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class ManhuascanUs : MangaThemesia(
|
||||
"Manhuascan.us",
|
||||
"https://manhuascan.us",
|
||||
"en",
|
||||
mangaUrlDirectory = "/manga-list",
|
||||
dateFormat = SimpleDateFormat("dd-MM-yyyy", Locale.ROOT),
|
||||
) {
|
||||
override val seriesAuthorSelector = ".tsinfo .imptdt:contains(Author) a"
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val url = baseUrl.toHttpUrl().newBuilder()
|
||||
.addPathSegment(mangaUrlDirectory.substring(1))
|
||||
.addQueryParameter("search", query)
|
||||
.addQueryParameter("page", page.toString())
|
||||
|
||||
filters.forEach { filter ->
|
||||
when (filter) {
|
||||
is OrderByFilter -> {
|
||||
url.addQueryParameter("order", filter.selectedValue())
|
||||
}
|
||||
else -> { /* Do Nothing */ }
|
||||
}
|
||||
}
|
||||
|
||||
url.addPathSegment("")
|
||||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
override fun getFilterList(): FilterList {
|
||||
val orderByFilter = super.getFilterList().find { it is OrderByFilter } as? OrderByFilter
|
||||
|
||||
return FilterList(
|
||||
Filter.Header("NOTE: Ignored if using text search!"),
|
||||
Filter.Separator(),
|
||||
orderByFilter!!,
|
||||
)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user