diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 92e9b4a5..76a4c169 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1610,6 +1610,32 @@ object SoraExtractor : SoraStream() { } suspend fun invokeMoviezAdd( + apiUrl: String? = null, + api: String? = null, + title: String? = null, + year: Int? = null, + season: Int? = null, + episode: Int? = null, + callback: (ExtractorLink) -> Unit + ) { + invokeBloginguru(apiUrl, api, title, year, season, episode, callback) + } + + suspend fun invokeBollyMaza( + apiUrl: String? = null, + api: String? = null, + title: String? = null, + year: Int? = null, + season: Int? = null, + episode: Int? = null, + callback: (ExtractorLink) -> Unit + ) { + invokeBloginguru(apiUrl, api, title, year, season, episode, callback) + } + + private suspend fun invokeBloginguru( + apiUrl: String? = null, + api: String? = null, title: String? = null, year: Int? = null, season: Int? = null, @@ -1617,7 +1643,7 @@ object SoraExtractor : SoraStream() { callback: (ExtractorLink) -> Unit ) { val fixTitle = title?.fixTitle()?.replace("-", " ") - val doc = app.get("$moviezAddAPI/?s=$fixTitle").document + val doc = app.get("$apiUrl/?s=$fixTitle").document val matchMedia = doc.select("article.mh-loop-item").map { it.select("a").attr("href") to it.select("a").text() @@ -1636,7 +1662,7 @@ object SoraExtractor : SoraStream() { ?.split("|") ?.map { it.trim() } - val iframe = if (season == null) { + val iframe = (if (season == null) { media?.mapIndexed { index, name -> detailDoc.select("div.entry-content > pre")[index.plus(1)].selectFirst("a") ?.attr("href") to name @@ -1651,7 +1677,7 @@ object SoraExtractor : SoraStream() { ).document.selectFirst("div.entry-content strong:matches((?i)S0?${season}E0?${episode}) a") ?.attr("href") to name } - } + })?.filter { it?.first?.startsWith("http") == true } iframe?.apmap { val token = app.get( @@ -1670,8 +1696,8 @@ object SoraExtractor : SoraStream() { callback.invoke( ExtractorLink( - "MoviezAdd $qualityName", - "MoviezAdd $qualityName", + "$api $qualityName", + "$api $qualityName", shortLink ?: return@apmap null, "", quality ?: Qualities.Unknown.value diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index b540f6f3..a74d06c3 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -2,6 +2,7 @@ package com.hexated import com.fasterxml.jackson.annotation.JsonProperty import com.hexated.SoraExtractor.invoke123Movie +import com.hexated.SoraExtractor.invokeBollyMaza import com.hexated.SoraExtractor.invokeDbgo import com.hexated.SoraExtractor.invokeFilmxy import com.hexated.SoraExtractor.invokeFlixhq @@ -88,7 +89,8 @@ open class SoraStream : TmdbProvider() { const val fdMoviesAPI = "https://freedrivemovie.com" const val m4uhdAPI = "https://m4uhd.tv" const val tvMoviesAPI = "https://www.tvseriesnmovies.com" - const val moviezAddAPI = "https://moviezaddiction.bloginguru.info" + const val moviezAddAPI = "https://m.bloginguru.info" + const val bollyMazaAPI = "https://b.bloginguru.info" const val moviesbayAPI = "https://moviesbay.live" fun getType(t: String?): TvType { @@ -147,7 +149,8 @@ open class SoraStream : TmdbProvider() { 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 @@ -363,7 +366,13 @@ open class SoraStream : TmdbProvider() { ) }, { - if (!res.isAnime) invokeHDMovieBox(res.title, res.season, res.episode, subtitleCallback, callback) + if (!res.isAnime) invokeHDMovieBox( + res.title, + res.season, + res.episode, + subtitleCallback, + callback + ) }, { invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback) @@ -482,6 +491,8 @@ open class SoraStream : TmdbProvider() { }, { if (!res.isAnime) invokeMoviezAdd( + moviezAddAPI, + "MoviezAdd", res.title, res.year, res.season, @@ -489,6 +500,17 @@ open class SoraStream : TmdbProvider() { callback ) }, + { + if (!res.isAnime) invokeBollyMaza( + bollyMazaAPI, + "BollyMaza", + res.title, + res.year, + res.season, + res.episode, + callback + ) + } ) return true