mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Kickassanime, Kuramanime and added duration in SoraStream
This commit is contained in:
parent
c4a5dfe065
commit
4e68bcf923
5 changed files with 13 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 8
|
version = 9
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -23,7 +23,7 @@ suspend fun String.fixIframe(): List<Pair<String?, String?>> {
|
||||||
val source = decode(
|
val source = decode(
|
||||||
this.substringAfter("&data=").substringBefore("&vref=")
|
this.substringAfter("&data=").substringBefore("&vref=")
|
||||||
)
|
)
|
||||||
listOf(URI(source).host.substringBefore(".") to source)
|
listOf("gogo" to source)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
emptyList()
|
emptyList()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 8
|
version = 9
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -118,11 +118,14 @@ class KuramanimeProvider : MainAPI() {
|
||||||
|
|
||||||
for (i in 1..6) {
|
for (i in 1..6) {
|
||||||
val doc = app.get("$url?page=$i").document
|
val doc = app.get("$url?page=$i").document
|
||||||
val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content")).select("a").mapNotNull {
|
val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content")).select("a.btn.btn-sm.btn-danger")
|
||||||
|
.mapNotNull {
|
||||||
val name = it.text().trim()
|
val name = it.text().trim()
|
||||||
|
val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)
|
||||||
|
?.toIntOrNull()
|
||||||
val link = it.attr("href")
|
val link = it.attr("href")
|
||||||
Episode(link, name)
|
Episode(link, name, episode = episode)
|
||||||
}.filter { it.name?.contains(Regex("(?i)(Terlama)|(Terbaru)")) == false }
|
}
|
||||||
if(eps.isEmpty()) break else episodes.addAll(eps)
|
if(eps.isEmpty()) break else episodes.addAll(eps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
this.backgroundPosterUrl = bgPoster
|
this.backgroundPosterUrl = bgPoster
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = res.overview
|
this.plot = res.overview
|
||||||
|
this.duration = res.runtime
|
||||||
this.tags = if (isAnime) keywords else genres
|
this.tags = if (isAnime) keywords else genres
|
||||||
this.rating = rating
|
this.rating = rating
|
||||||
this.recommendations = recommendations
|
this.recommendations = recommendations
|
||||||
|
@ -724,6 +725,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
@JsonProperty("release_date") val releaseDate: String? = null,
|
@JsonProperty("release_date") val releaseDate: String? = null,
|
||||||
@JsonProperty("first_air_date") val firstAirDate: String? = null,
|
@JsonProperty("first_air_date") val firstAirDate: String? = null,
|
||||||
@JsonProperty("overview") val overview: String? = null,
|
@JsonProperty("overview") val overview: String? = null,
|
||||||
|
@JsonProperty("runtime") val runtime: Int? = null,
|
||||||
@JsonProperty("vote_average") val vote_average: Any? = null,
|
@JsonProperty("vote_average") val vote_average: Any? = null,
|
||||||
@JsonProperty("original_language") val original_language: String? = null,
|
@JsonProperty("original_language") val original_language: String? = null,
|
||||||
@JsonProperty("status") val status: String? = null,
|
@JsonProperty("status") val status: String? = null,
|
||||||
|
|
Loading…
Reference in a new issue