mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
updated idlix
This commit is contained in:
parent
7cc37e316f
commit
fa0ee2866f
2 changed files with 19 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -20,6 +20,8 @@ cloudstream {
|
||||||
tvTypes = listOf(
|
tvTypes = listOf(
|
||||||
"TvSeries",
|
"TvSeries",
|
||||||
"Movie",
|
"Movie",
|
||||||
|
"Anime",
|
||||||
|
"AsianDrama",
|
||||||
)
|
)
|
||||||
|
|
||||||
iconUrl = "https://www.google.com/s2/favicons?domain=94.103.82.88&sz=%size%"
|
iconUrl = "https://www.google.com/s2/favicons?domain=94.103.82.88&sz=%size%"
|
||||||
|
|
|
@ -19,15 +19,19 @@ class IdlixProvider : MainAPI() {
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.Movie,
|
TvType.Movie,
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
|
TvType.Anime,
|
||||||
|
TvType.AsianDrama
|
||||||
)
|
)
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
|
"$mainUrl/" to "Featured",
|
||||||
"$mainUrl/trending/page/?get=movies" to "Trending Movies",
|
"$mainUrl/trending/page/?get=movies" to "Trending Movies",
|
||||||
"$mainUrl/trending/page/?get=tv" to "Trending TV Series",
|
"$mainUrl/trending/page/?get=tv" to "Trending TV Series",
|
||||||
"$mainUrl/movie/page/" to "Movie Terbaru",
|
"$mainUrl/movie/page/" to "Movie Terbaru",
|
||||||
"$mainUrl/tvseries/page/" to "TV Series Terbaru",
|
"$mainUrl/tvseries/page/" to "TV Series Terbaru",
|
||||||
"$mainUrl/season/page/" to "Season Terbaru",
|
"$mainUrl/network/netflix/page/" to "Netflix",
|
||||||
"$mainUrl/episode/page/" to "Episode Terbaru",
|
"$mainUrl/genre/anime/page/" to "Anime",
|
||||||
|
"$mainUrl/genre/drama-korea/page/" to "Drama Korea",
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun getMainPage(
|
override suspend fun getMainPage(
|
||||||
|
@ -35,8 +39,16 @@ class IdlixProvider : MainAPI() {
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
val url = request.data.split("?")
|
val url = request.data.split("?")
|
||||||
val document = app.get("${url.first()}$page/?${url.lastOrNull()}").document
|
val document = if (request.name == "Featured") {
|
||||||
val home = document.select("div.items.full article, div#archive-content article").mapNotNull {
|
app.get(request.data).document
|
||||||
|
} else {
|
||||||
|
app.get("${url.first()}$page/?${url.lastOrNull()}").document
|
||||||
|
}
|
||||||
|
val home = (if (request.name == "Featured") {
|
||||||
|
document.select("div.items.featured article")
|
||||||
|
} else {
|
||||||
|
document.select("div.items.full article, div#archive-content article")
|
||||||
|
}).mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(request.name, home)
|
return newHomePageResponse(request.name, home)
|
||||||
|
|
Loading…
Reference in a new issue