added SoraStreamLite

This commit is contained in:
hexated 2023-01-31 13:30:37 +07:00
parent a6e5375cad
commit 8101293485
4 changed files with 173 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 78
version = 79
cloudstream {

View file

@ -571,7 +571,7 @@ open class SoraStream : TmdbProvider() {
return true
}
private data class LinkData(
data class LinkData(
val id: Int? = null,
val imdbId: String? = null,
val type: String? = null,

View file

@ -0,0 +1,170 @@
package com.hexated
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.argamap
import com.lagradost.cloudstream3.utils.AppUtils
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 {
val res = AppUtils.parseJson<LinkData>(data)
argamap(
{
SoraExtractor.invokeSoraStream(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeTwoEmbed(res.id, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invoke123Movie(
res.id,
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeMovieHab(res.imdbId, res.season, res.episode, subtitleCallback, callback)
},
{
if (res.isAnime) SoraExtractor.invokeAnimes(
res.id,
res.title,
res.epsTitle,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (res.season != null && res.isAnime) SoraExtractor.invokeCrunchyroll(
res.title,
res.epsTitle,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) SoraExtractor.invokeHDMovieBox(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeIdlix(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeUniqueStream(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeXmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeFlixhq(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeKisskh(res.title, res.season, res.episode, subtitleCallback, callback)
},
{
SoraExtractor.invokeLing(
res.title,
res.airedYear ?: res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeFwatayako(res.imdbId, res.season, res.episode, callback)
},
{
SoraExtractor.invokeM4uhd(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
SoraExtractor.invokeRStream(res.id, res.season, res.episode, callback)
},
{
SoraExtractor.invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
},
)
return true
}
}

View file

@ -10,6 +10,7 @@ class SoraStreamPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(SoraStream())
registerMainAPI(SoraStreamLite())
registerExtractorAPI(StreamM4u())
registerExtractorAPI(Sblongvu())
}