mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
fixed Kuramanime
This commit is contained in:
parent
815dcecec0
commit
4f0ce224b4
2 changed files with 9 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -21,12 +21,6 @@ class KuramanimeProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getType(t: String): TvType {
|
|
||||||
return if (t.contains("OVA") || t.contains("Special")) TvType.OVA
|
|
||||||
else if (t.contains("Movie")) TvType.AnimeMovie
|
|
||||||
else TvType.Anime
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getStatus(t: String): ShowStatus {
|
fun getStatus(t: String): ShowStatus {
|
||||||
return when (t) {
|
return when (t) {
|
||||||
"Selesai Tayang" -> ShowStatus.Completed
|
"Selesai Tayang" -> ShowStatus.Completed
|
||||||
|
@ -80,20 +74,11 @@ class KuramanimeProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val link = "$mainUrl/anime?search=$query&order_by=oldest"
|
val link = "$mainUrl/anime?search=$query&order_by=latest"
|
||||||
val document = app.get(link).document
|
val document = app.get(link).document
|
||||||
|
|
||||||
return document.select(".product__item").mapNotNull {
|
return document.select("div#animeList div.col-lg-4.col-md-6.col-sm-6").mapNotNull {
|
||||||
val title = it.selectFirst("div.product__item__text > h5")!!.text().trim()
|
it.toSearchResult()
|
||||||
val poster = it.selectFirst("a > div")!!.attr("data-setbg")
|
|
||||||
val tvType =
|
|
||||||
getType(it.selectFirst(".product__item__text > ul > li")!!.text().toString())
|
|
||||||
val href = fixUrl(it.selectFirst("a")!!.attr("href"))
|
|
||||||
|
|
||||||
newAnimeSearchResponse(title, href, tvType) {
|
|
||||||
this.posterUrl = poster
|
|
||||||
addDubStatus(dubExist = false, subExist = true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +149,10 @@ class KuramanimeProvider : MainAPI() {
|
||||||
name,
|
name,
|
||||||
url,
|
url,
|
||||||
referer = "$mainUrl/",
|
referer = "$mainUrl/",
|
||||||
quality = quality
|
quality = quality,
|
||||||
|
headers = mapOf(
|
||||||
|
"Range" to "bytes=0-"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue