This commit is contained in:
alex 2024-01-08 02:17:40 +07:00
parent 97339447c7
commit e8110fab62
4 changed files with 971 additions and 496 deletions

View file

@ -20,9 +20,10 @@ class KuramanimeProvider : MainAPI() {
override val hasMainPage = true
override var lang = "id"
override val hasDownloadSupport = true
private var params: AuthParams? = null
private var miscUrl: String? = null
private var headers: Map<String, String> = mapOf()
private var cookies: Map<String, String> = mapOf()
private var mixPage: Pair<String, String>? = null
override val supportedTypes = setOf(
TvType.Anime,
TvType.AnimeMovie,
@ -102,7 +103,8 @@ class KuramanimeProvider : MainAPI() {
val title = document.selectFirst(".anime__details__title > h3")!!.text().trim()
val poster = document.selectFirst(".anime__details__pic")?.attr("data-setbg")
val tags = document.select("div.anime__details__widget > div > div:nth-child(2) > ul > li:nth-child(1)")
val tags =
document.select("div.anime__details__widget > div > div:nth-child(2) > ul > li:nth-child(1)")
.text().trim().replace("Genre: ", "").split(", ")
val year = Regex("\\D").replace(
@ -117,9 +119,10 @@ class KuramanimeProvider : MainAPI() {
val episodes = mutableListOf<Episode>()
for (i in 1..6) {
for (i in 1..10) {
val doc = app.get("$url?page=$i").document
val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content")).select("a.btn.btn-sm.btn-danger")
val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content"))
.select("a.btn.btn-sm.btn-danger")
.mapNotNull {
val name = it.text().trim()
val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)
@ -130,7 +133,10 @@ class KuramanimeProvider : MainAPI() {
if (eps.isEmpty()) break else episodes.addAll(eps)
}
val type = getType(document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv", episodes.size)
val type = getType(
document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()
?.lowercase() ?: "tv", episodes.size
)
val recommendations = document.select("div#randomList > a").mapNotNull {
val epHref = it.attr("href")
val epTitle = it.select("h5.sidebar-title-h5.px-2.py-2").text()
@ -162,12 +168,11 @@ class KuramanimeProvider : MainAPI() {
private suspend fun invokeLocalSource(
url: String,
server: String,
ref: String,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val document = app.get(
url,
referer = ref,
headers = headers,
cookies = cookies
).document
@ -190,6 +195,11 @@ class KuramanimeProvider : MainAPI() {
)
)
}
if(server=="kuramadrive") {
document.select("div#animeDownloadLink a").apmap {
loadExtractor(it.attr("href"), "$mainUrl/", subtitleCallback, callback)
}
}
}
override suspend fun loadLinks(
@ -201,18 +211,19 @@ class KuramanimeProvider : MainAPI() {
val req = app.get(data)
val res = req.document
argamap(
{
val auth = getAuth(data)
headers = auth.authHeader?.associate { it.first to it.second }?.filter { it.key != "Cookie" }!!
cookies = req.cookies
val bpjs = res.selectFirst("div.col-lg-12.mt-3")?.attr("data-bpjs") ?: return false
val auth = getMiscUrl(data)
val misc = getMisc(auth)
val mixPage = getMixPage(bpjs)
res.select("select#changeServer option").apmap { source ->
val server = source.attr("value")
val query = auth.serverUrl?.queryParameterNames?.map { it } ?: return@apmap
val link = "$data?${query[0]}=${getMisc(auth.authUrl)}&${query[1]}=$server"
val link = "$data?${mixPage.first}=$misc&${mixPage.second}=$server"
if (server.contains(Regex("(?i)kuramadrive|archive"))) {
invokeLocalSource(link, server, data, callback)
invokeLocalSource(link, server, subtitleCallback, callback)
} else {
app.get(
link,
@ -224,47 +235,62 @@ class KuramanimeProvider : MainAPI() {
}
}
}
},
{
res.select("div#animeDownloadLink a").apmap {
loadExtractor(it.attr("href"), "$mainUrl/", subtitleCallback, callback)
}
}
)
return true
}
private suspend fun fetchAuth(url: String) : AuthParams {
val regex = Regex("""$mainUrl/\S+""")
private suspend fun fetchMiscUrl(url: String): String {
val regex = Regex("""$mainUrl/.*""")
val found = WebViewResolver(
Regex("""$url(?!\?page=)\?"""),
additionalUrls = listOf(regex)
Regex("""$mainUrl/assets/\S+.jpg"""),
additionalUrls = listOf(regex),
).resolveUsingWebView(
requestCreator(
"GET", url
, cookies = cookies, referer = "$mainUrl/", headers = mapOf(
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language" to "en-US,en;q=0.5",
)
)
val addition = found.second.findLast { it.headers["X-Requested-With"] == "XMLHttpRequest" }
return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers)
).first
headers = found?.headers?.associate { it.first to it.second } ?: mapOf()
return found?.url.toString()
}
private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it }
private suspend fun getMiscUrl(url: String) = miscUrl ?: fetchMiscUrl(url).also { miscUrl = it }
private suspend fun fetchMixPage(bpjs: String): Pair<String,String> {
val env = app.get("$mainUrl/assets/js/$bpjs.js").text
val MIX_PAGE_TOKEN_KEY = env.substringAfter("MIX_PAGE_TOKEN_KEY: '").substringBefore("',")
val MIX_STREAM_SERVER_KEY = env.substringAfter("MIX_STREAM_SERVER_KEY: '").substringBefore("',")
return MIX_PAGE_TOKEN_KEY to MIX_STREAM_SERVER_KEY
}
private suspend fun getMixPage(bpjs: String) = mixPage ?: fetchMixPage(bpjs).also { mixPage = it }
private suspend fun getMisc(url: String?): String {
val misc = app.get(
"$url",
headers = headers,
cookies = cookies
)
cookies = misc.cookies
return misc.parsed()
val res = app.get("$url", headers = headers)
cookies = res.cookies
return res.text.removeBloat()
}
private fun getRequestId(length: Int = 6): String {
val allowedChars = ('a'..'z') + ('0'..'9')
return (1..length)
.map { allowedChars.random() }
.joinToString("")
}
private fun String.removeBloat() : String {
return this.replace("\"", "")
}
data class AuthParams(
val serverUrl: HttpUrl?,
val authUrl: String?,
val authHeader: Headers?,
val header: Map<String, String>?,
val params: List<String>?,
val misc: String,
val miscUrl: String?,
)
}

View file

@ -24,5 +24,5 @@ cloudstream {
"OVA",
)
iconUrl = "https://www.google.com/s2/favicons?domain=neonime.watch&sz=%size%"
iconUrl = "https://www.google.com/s2/favicons?domain=neonime.ink&sz=%size%"
}

View file

@ -180,9 +180,11 @@ open class SoraStream : TmdbProvider() {
}
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val adultQuery = if (settingsForProvider.enableAdult) "" else "&without_keywords=190370|13059|226161|195669"
val adultQuery =
if (settingsForProvider.enableAdult) "" else "&without_keywords=190370|13059|226161|195669"
val type = if (request.data.contains("/movie")) "movie" else "tv"
val home = app.get("${request.data}$adultQuery&page=$page").parsedSafe<Results>()?.results?.mapNotNull { media ->
val home = app.get("${request.data}$adultQuery&page=$page")
.parsedSafe<Results>()?.results?.mapNotNull { media ->
media.toSearchResponse(type)
} ?: throw ErrorLoadingException("Invalid Json reponse")
return newHomePageResponse(request.name, home)
@ -201,7 +203,8 @@ open class SoraStream : TmdbProvider() {
override suspend fun quickSearch(query: String): List<SearchResponse>? = search(query)
override suspend fun search(query: String): List<SearchResponse>? {
return app.get("$tmdbAPI/search/multi?api_key=$apiKey&language=en-US&query=$query&page=1&include_adult=${settingsForProvider.enableAdult}").parsedSafe<Results>()?.results?.mapNotNull { media ->
return app.get("$tmdbAPI/search/multi?api_key=$apiKey&language=en-US&query=$query&page=1&include_adult=${settingsForProvider.enableAdult}")
.parsedSafe<Results>()?.results?.mapNotNull { media ->
media.toSearchResponse()
}
}
@ -232,27 +235,68 @@ open class SoraStream : TmdbProvider() {
val isAsian = !isAnime && (res.original_language == "zh" || res.original_language == "ko")
val isBollywood = res.production_countries?.any { it.name == "India" } ?: false
val keywords = res.keywords?.results?.mapNotNull { it.name }.orEmpty().ifEmpty { res.keywords?.keywords?.mapNotNull { it.name } }
val keywords = res.keywords?.results?.mapNotNull { it.name }.orEmpty()
.ifEmpty { res.keywords?.keywords?.mapNotNull { it.name } }
val actors = res.credits?.cast?.mapNotNull { cast ->
ActorData(Actor(cast.name ?: cast.originalName
?: return@mapNotNull null, getImageUrl(cast.profilePath)), roleString = cast.character)
ActorData(
Actor(
cast.name ?: cast.originalName
?: return@mapNotNull null, getImageUrl(cast.profilePath)
), roleString = cast.character
)
} ?: return null
val recommendations = res.recommendations?.results?.mapNotNull { media -> media.toSearchResponse() }
val recommendations =
res.recommendations?.results?.mapNotNull { media -> media.toSearchResponse() }
val trailer = res.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.randomOrNull()
val trailer =
res.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.randomOrNull()
return if (type == TvType.TvSeries) {
val lastSeason = res.last_episode_to_air?.season_number
val episodes = res.seasons?.mapNotNull { season ->
app.get("$tmdbAPI/${data.type}/${data.id}/season/${season.seasonNumber}?api_key=$apiKey").parsedSafe<MediaDetailEpisodes>()?.episodes?.map { eps ->
Episode(LinkData(data.id, res.external_ids?.imdb_id, res.external_ids?.tvdb_id, data.type, eps.seasonNumber, eps.episodeNumber, title = title, year = season.airDate?.split("-")?.first()?.toIntOrNull(), orgTitle = orgTitle, isAnime = isAnime, airedYear = year, lastSeason = lastSeason, epsTitle = eps.name, jpTitle = res.alternative_titles?.results?.find { it.iso_3166_1 == "JP" }?.title, date = season.airDate, airedDate = res.releaseDate
?: res.firstAirDate, isAsian = isAsian, isBollywood = isBollywood, isCartoon = isCartoon).toJson(), name = eps.name + if (isUpcoming(eps.airDate)) " - [UPCOMING]" else "", season = eps.seasonNumber, episode = eps.episodeNumber, posterUrl = getImageUrl(eps.stillPath), rating = eps.voteAverage?.times(10)?.roundToInt(), description = eps.overview).apply {
app.get("$tmdbAPI/${data.type}/${data.id}/season/${season.seasonNumber}?api_key=$apiKey")
.parsedSafe<MediaDetailEpisodes>()?.episodes?.map { eps ->
Episode(
LinkData(
data.id,
res.external_ids?.imdb_id,
res.external_ids?.tvdb_id,
data.type,
eps.seasonNumber,
eps.episodeNumber,
title = title,
year = season.airDate?.split("-")?.first()?.toIntOrNull(),
orgTitle = orgTitle,
isAnime = isAnime,
airedYear = year,
lastSeason = lastSeason,
epsTitle = eps.name,
jpTitle = res.alternative_titles?.results?.find { it.iso_3166_1 == "JP" }?.title,
date = season.airDate,
airedDate = res.releaseDate
?: res.firstAirDate,
isAsian = isAsian,
isBollywood = isBollywood,
isCartoon = isCartoon
).toJson(),
name = eps.name + if (isUpcoming(eps.airDate)) " - [UPCOMING]" else "",
season = eps.seasonNumber,
episode = eps.episodeNumber,
posterUrl = getImageUrl(eps.stillPath),
rating = eps.voteAverage?.times(10)?.roundToInt(),
description = eps.overview
).apply {
this.addDate(eps.airDate)
}
}
}?.flatten() ?: listOf()
newTvSeriesLoadResponse(title, url, if (isAnime) TvType.Anime else TvType.TvSeries, episodes) {
newTvSeriesLoadResponse(
title,
url,
if (isAnime) TvType.Anime else TvType.TvSeries,
episodes
) {
this.posterUrl = poster
this.backgroundPosterUrl = bgPoster
this.year = year
@ -272,8 +316,21 @@ open class SoraStream : TmdbProvider() {
title,
url,
TvType.Movie,
LinkData(data.id, res.external_ids?.imdb_id, res.external_ids?.tvdb_id, data.type, title = title, year = year, orgTitle = orgTitle, isAnime = isAnime, jpTitle = res.alternative_titles?.results?.find { it.iso_3166_1 == "JP" }?.title, airedDate = res.releaseDate
?: res.firstAirDate, isAsian = isAsian, isBollywood = isBollywood).toJson(),
LinkData(
data.id,
res.external_ids?.imdb_id,
res.external_ids?.tvdb_id,
data.type,
title = title,
year = year,
orgTitle = orgTitle,
isAnime = isAnime,
jpTitle = res.alternative_titles?.results?.find { it.iso_3166_1 == "JP" }?.title,
airedDate = res.releaseDate
?: res.firstAirDate,
isAsian = isAsian,
isBollywood = isBollywood
).toJson(),
) {
this.posterUrl = poster
this.backgroundPosterUrl = bgPoster
@ -293,16 +350,36 @@ open class SoraStream : TmdbProvider() {
}
}
override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean {
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val res = parseJson<LinkData>(data)
argamap(
{
invokeDumpStream(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeDumpStream(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
invokeGoku(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
},
{
invokeVidSrc(res.id, res.season, res.episode, callback)
@ -311,132 +388,334 @@ open class SoraStream : TmdbProvider() {
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
},
{
if (!res.isAnime) invokeAoneroom(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeAoneroom(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (res.isAnime) invokeAnimes(res.title, res.epsTitle, res.date, res.airedDate, res.season, res.episode, subtitleCallback, callback)
if (res.isAnime) invokeAnimes(
res.title,
res.epsTitle,
res.date,
res.airedDate,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeDreamfilm(res.title, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeDreamfilm(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
// {
// invokeNoverse(res.title, res.season, res.episode, callback)
// },
{
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeFilmxy(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime && res.isCartoon) invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime && res.isCartoon) invokeKimcartoon(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime && res.isCartoon) invokeWatchCartoon(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime && res.isCartoon) invokeWatchCartoon(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeVidsrcto(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeVidsrcto(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isAsian || res.isAnime) invokeKisskh(res.title, res.season, res.episode, res.isAnime, res.lastSeason, subtitleCallback, callback)
if (res.isAsian || res.isAnime) invokeKisskh(
res.title,
res.season,
res.episode,
res.isAnime,
res.lastSeason,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeOmovies(res.title, res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeOmovies(
res.title,
res.year,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime) invokeLing(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeLing(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeUhdmovies(res.title, res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeUhdmovies(
res.title,
res.year,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime) invokeGMovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeGMovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeFDMovies(res.title, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeM4uhd(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeM4uhd(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeTvMovies(res.title, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeMoviezAdd(moviezAddAPI, "MoviezAdd", res.title, res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeMoviezAdd(
moviezAddAPI,
"MoviezAdd",
res.title,
res.year,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime && res.isBollywood) invokeBollyMaza(bollyMazaAPI, "BollyMaza", res.title, res.year, res.season, res.episode, callback)
if (!res.isAnime && res.isBollywood) invokeBollyMaza(
bollyMazaAPI,
"BollyMaza",
res.title,
res.year,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime) invokeRStream(res.id, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
if (!res.isAnime) invokeFlixon(
res.id,
res.imdbId,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime) invokeSmashyStream(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeSmashyStream(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeWatchsomuch(res.imdbId, res.season, res.episode, subtitleCallback)
if (!res.isAnime) invokeWatchsomuch(
res.imdbId,
res.season,
res.episode,
subtitleCallback
)
},
{
if (!res.isAnime) invokeNinetv(res.id, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeNinetv(
res.id,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeDahmerMovies(res.title, res.year, res.season, res.episode, callback)
},
{
invokeCinemaTv(res.imdbId, res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
invokeCinemaTv(
res.imdbId, res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
},
{
if (!res.isAnime && res.season == null) invokeRidomovies(res.id, res.imdbId, callback)
if (!res.isAnime && res.season == null) invokeRidomovies(
res.id,
res.imdbId,
callback
)
},
{
if (!res.isAnime) invokeAllMovieland(res.imdbId, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeEmovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeEmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeVegamovies(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeVegamovies(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime && res.isBollywood) invokeDotmovies(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
if (!res.isAnime && res.isBollywood) invokeDotmovies(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isBollywood) invokeMultimovies(multimoviesAPI, res.title, res.season, res.episode, subtitleCallback, callback)
if (res.isBollywood) invokeMultimovies(
multimoviesAPI,
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isBollywood) invokeMultimovies(multimovies2API, res.title, res.season, res.episode, subtitleCallback, callback)
if (res.isBollywood) invokeMultimovies(
multimovies2API,
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeNetmovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeNetmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime && res.season == null) invokeDoomovies(res.title, subtitleCallback, callback)
if (!res.isAnime && res.season == null) invokeDoomovies(
res.title,
subtitleCallback,
callback
)
},
{
if (res.isAsian) invokeDramaday(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (res.isAsian) invokeDramaday(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invoke2embed(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invoke2embed(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeHdmovies4u(res.title, res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeHdmovies4u(
res.title,
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeZshow(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeZshow(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeShowflix(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeShowflix(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeSFMovies(res.id, res.title, res.airedYear
?: res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeSFMovies(
res.id, res.title, res.airedYear
?: res.year, res.season, res.episode, callback
)
},
{
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)

View file

@ -42,22 +42,53 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
class SoraStreamLite : SoraStream() {
override var name = "SoraStream-Lite"
override suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean {
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val res = AppUtils.parseJson<LinkData>(data)
argamap(
{
if (!res.isAnime) invokeWatchsomuch(res.imdbId, res.season, res.episode, subtitleCallback)
if (!res.isAnime) invokeWatchsomuch(
res.imdbId,
res.season,
res.episode,
subtitleCallback
)
},
{
invokeDumpStream(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeDumpStream(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeNinetv(res.id, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeNinetv(
res.id,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
invokeGoku(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
},
{
invokeVidSrc(res.id, res.season, res.episode, callback)
@ -66,93 +97,232 @@ class SoraStreamLite : SoraStream() {
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
},
{
if (!res.isAnime && res.isCartoon) invokeWatchCartoon(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime && res.isCartoon) invokeWatchCartoon(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isAnime) invokeAnimes(res.title, res.epsTitle, res.date, res.airedDate, res.season, res.episode, subtitleCallback, callback)
if (res.isAnime) invokeAnimes(
res.title,
res.epsTitle,
res.date,
res.airedDate,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeDreamfilm(res.title, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeDreamfilm(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeFilmxy(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeOmovies(res.title, res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeOmovies(
res.title,
res.year,
res.season,
res.episode,
callback
)
},
{
if (!res.isAnime && res.isCartoon) invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime && res.isCartoon) invokeKimcartoon(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeSmashyStream(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeSmashyStream(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeVidsrcto(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeVidsrcto(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isAsian || res.isAnime) invokeKisskh(res.title, res.season, res.episode, res.isAnime, res.lastSeason, subtitleCallback, callback)
if (res.isAsian || res.isAnime) invokeKisskh(
res.title,
res.season,
res.episode,
res.isAnime,
res.lastSeason,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeLing(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeLing(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeM4uhd(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeM4uhd(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeRStream(res.id, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
if (!res.isAnime) invokeFlixon(
res.id,
res.imdbId,
res.season,
res.episode,
callback
)
},
{
invokeCinemaTv(res.imdbId, res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
invokeCinemaTv(
res.imdbId, res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
},
{
if (!res.isAnime) invokeAoneroom(res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeAoneroom(
res.title, res.airedYear
?: res.year, res.season, res.episode, subtitleCallback, callback
)
},
{
if (!res.isAnime && res.season == null) invokeRidomovies(res.id, res.imdbId, callback)
if (!res.isAnime && res.season == null) invokeRidomovies(
res.id,
res.imdbId,
callback
)
},
{
if (!res.isAnime) invokeEmovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeEmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isBollywood) invokeMultimovies(multimoviesAPI, res.title, res.season, res.episode, subtitleCallback, callback)
if (res.isBollywood) invokeMultimovies(
multimoviesAPI,
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.isBollywood) invokeMultimovies(multimovies2API, res.title, res.season, res.episode, subtitleCallback, callback)
if (res.isBollywood) invokeMultimovies(
multimovies2API,
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeNetmovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeNetmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeAllMovieland(res.imdbId, res.season, res.episode, callback)
},
{
if (!res.isAnime && res.season == null) invokeDoomovies(res.title, subtitleCallback, callback)
if (!res.isAnime && res.season == null) invokeDoomovies(
res.title,
subtitleCallback,
callback
)
},
{
if (res.isAsian) invokeDramaday(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (res.isAsian) invokeDramaday(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invoke2embed(res.imdbId, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invoke2embed(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeZshow(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
invokeZshow(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeShowflix(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
if (!res.isAnime) invokeShowflix(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeSFMovies(res.id, res.title, res.airedYear
?: res.year, res.season, res.episode, callback)
if (!res.isAnime) invokeSFMovies(
res.id, res.title, res.airedYear
?: res.year, res.season, res.episode, callback
)
},
{
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)