package com.hexated import com.hexated.SoraExtractor.invoke2embed import com.hexated.SoraExtractor.invokeAllMovieland import com.hexated.SoraExtractor.invokeAnimes import com.hexated.SoraExtractor.invokeAoneroom import com.hexated.SoraExtractor.invokeDoomovies import com.hexated.SoraExtractor.invokeDramaday import com.hexated.SoraExtractor.invokeDreamfilm import com.hexated.SoraExtractor.invokeFilmxy import com.hexated.SoraExtractor.invokeFlixon import com.hexated.SoraExtractor.invokeGoku import com.hexated.SoraExtractor.invokeKimcartoon import com.hexated.SoraExtractor.invokeKisskh import com.hexated.SoraExtractor.invokeLing import com.hexated.SoraExtractor.invokeM4uhd import com.hexated.SoraExtractor.invokeNinetv import com.hexated.SoraExtractor.invokeNowTv import com.hexated.SoraExtractor.invokeRStream import com.hexated.SoraExtractor.invokeRidomovies import com.hexated.SoraExtractor.invokeSmashyStream import com.hexated.SoraExtractor.invokeDumpStream import com.hexated.SoraExtractor.invokeEmovies import com.hexated.SoraExtractor.invokeMultimovies import com.hexated.SoraExtractor.invokeNetmovies import com.hexated.SoraExtractor.invokeShowflix import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeMoflix import com.hexated.SoraExtractor.invokeGhostx import com.hexated.SoraExtractor.invokeMoviefiction import com.hexated.SoraExtractor.invokeNepu import com.hexated.SoraExtractor.invokeWatchCartoon import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZoechip import com.hexated.SoraExtractor.invokeZshow 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(data) argamap( { if (!res.isAnime) invokeMoflix(res.id, res.season, res.episode, callback) }, { if (!res.isAnime) invokeWatchsomuch( res.imdbId, res.season, res.episode, subtitleCallback ) }, { invokeDumpStream( res.title, res.year, 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 ) }, { invokeVidSrc(res.id, res.season, res.episode, 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) invokeDreamfilm( res.title, res.season, res.episode, subtitleCallback, callback ) }, { if (!res.isAnime) invokeFilmxy( res.imdbId, res.season, res.episode, subtitleCallback, callback ) }, { if (!res.isAnime) invokeGhostx( 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) invokeSmashyStream( res.id, 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.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) invokeRStream(res.id, 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 ) }, { 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) invokeRidomovies( res.id, res.imdbId, 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( multimovies2API, res.title, 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.isAsian) invokeDramaday( res.title, res.year, 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 ) }, { if (!res.isAnime) invokeShowflix( res.title, res.year, res.season, res.episode, subtitleCallback, callback ) }, { if (!res.isAnime) invokeZoechip( res.title, res.year, res.season, res.episode, callback ) }, { if (!res.isAnime) invokeNepu( res.title, res.airedYear ?: res.year, res.season, res.episode, callback ) } ) return true } }