diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 915d2f06..239303ee 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 85 +version = 86 cloudstream { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 48483099..aa8eaf65 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2180,6 +2180,28 @@ object SoraExtractor : SoraStream() { ) } + suspend fun invokeEdithxmovies( + apiUrl: String, + api: String, + title: String? = null, + year: Int? = null, + season: Int? = null, + episode: Int? = null, + callback: (ExtractorLink) -> Unit, + password: String? = null, + ) { + invokeIndex( + apiUrl, + api, + title, + year, + season, + episode, + callback, + password, + ) + } + private suspend fun invokeIndex( apiUrl: String, api: String, @@ -2196,17 +2218,25 @@ object SoraExtractor : SoraStream() { "Blackmovies", "CodexMovies", "Rinzrymovies", + "Edithxmovies", ) val lockedIndex = arrayOf( - "CodexMovies" + "CodexMovies", + "Edithxmovies", + ) + + val premiumIndex = arrayOf( + "Edithxmovies" ) val passHeaders = mapOf( "Authorization" to password ) - val query = getIndexQuery(title, year, season, episode) + val query = getIndexQuery(title, year, season, episode).let { + if(api in premiumIndex) "$it mkv" else it + } val body = """{"q":"$query","password":null,"page_token":null,"page_index":0}""".toRequestBody( RequestBodyTypes.JSON.toMediaTypeOrNull() @@ -2227,8 +2257,8 @@ object SoraExtractor : SoraStream() { } else { app.post("${apiUrl}search", requestBody = body).text } - val media = searchIndex(title, season, episode, year, search) ?: return - media.apmap { file -> + val media = if(api in premiumIndex) searchIndex(title, season, episode, year, search, false) else searchIndex(title, season, episode, year, search) + media?.apmap { file -> val pathBody = """{"id":"${file.id ?: return@apmap null}"}""".toRequestBody( RequestBodyTypes.JSON.toMediaTypeOrNull() ) @@ -2263,7 +2293,9 @@ object SoraExtractor : SoraStream() { } }.encodeUrl() - if (!app.get(path).isSuccessful) return@apmap null +// removed due to rate limit +// if (!app.get(path).isSuccessful) return@apmap null + val size = file.size?.toDouble() ?: return@apmap null val sizeFile = "%.2f GB".format(bytesToGigaBytes(size)) val quality = diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 9ac6474d..c416240b 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -23,11 +23,11 @@ import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.metaproviders.TmdbProvider import com.hexated.SoraExtractor.invokeCrunchyroll +import com.hexated.SoraExtractor.invokeEdithxmovies import com.hexated.SoraExtractor.invokeFDMovies import com.hexated.SoraExtractor.invokeFlixon import com.hexated.SoraExtractor.invokeFwatayako import com.hexated.SoraExtractor.invokeGMovies -import com.hexated.SoraExtractor.invokeGammovies import com.hexated.SoraExtractor.invokeJsmovies import com.hexated.SoraExtractor.invokeKisskh import com.hexated.SoraExtractor.invokeLing @@ -114,11 +114,12 @@ open class SoraStream : TmdbProvider() { const val baymoviesAPI = "https://thebayindexpublicgroupapi.zindex.eu.org" // dead const val chillmovies0API = "https://chill.aicirou.workers.dev/0:" // dead const val chillmovies1API = "https://chill.aicirou.workers.dev/1:" // dead - const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:" + const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:" // dead const val jsMoviesAPI = "https://jsupload.jnsbot.workers.dev/0:" const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:" const val rinzryMoviesAPI = "https://rinzry.stream/0:" const val codexMoviesAPI = "https://packs.codexcloudx.tech/0:" + const val edithxMoviesAPI = "https://index.edithx.ga/0:" fun getType(t: String?): TvType { return when (t) { @@ -587,17 +588,17 @@ open class SoraStream : TmdbProvider() { // callback // ) // }, - { - if (!res.isAnime) invokeGammovies( - gamMoviesAPI, - "Gammovies", - res.title, - res.year, - res.season, - res.episode, - callback - ) - }, +// { +// if (!res.isAnime) invokeGammovies( +// gamMoviesAPI, +// "Gammovies", +// res.title, +// res.year, +// res.season, +// res.episode, +// callback +// ) +// }, { invokeWatchsomuch( res.imdbId, @@ -650,6 +651,18 @@ open class SoraStream : TmdbProvider() { callback, "Basic Y29kZXg6Y29kZXhjbG91ZA==" ) + }, + { + if (!res.isAnime) invokeEdithxmovies( + edithxMoviesAPI, + "Edithxmovies", + res.title, + res.year, + res.season, + res.episode, + callback, + "Basic ZWRpdGg6amFydmlz" + ) } ) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 0e2f6ea6..30a12de2 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -547,7 +547,8 @@ fun searchIndex( season: Int? = null, episode: Int? = null, year: Int? = null, - response: String + response: String, + isTrimmed: Boolean = true, ): List? { val (dotSlug, spaceSlug) = getTitleSlug(title) val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode) @@ -575,11 +576,15 @@ fun searchIndex( ).contains("$spaceSlug", true)) }?.distinctBy { it.name }?.sortedByDescending { it.size?.toLongOrNull() ?: 0 } ?: return null - return files.let { file -> - listOfNotNull( - file.find { it.name?.contains("2160p", true) == true }, - file.find { it.name?.contains("1080p", true) == true } - ) + return if (isTrimmed) { + files.let { file -> + listOfNotNull( + file.find { it.name?.contains("2160p", true) == true }, + file.find { it.name?.contains("1080p", true) == true } + ) + } + } else { + files } }