From 6d9a1f7ed37bf46eaf43df981d9e4d3b285a4ce4 Mon Sep 17 00:00:00 2001 From: Stormunblessed <86633626+Stormunblessed@users.noreply.github.com> Date: Sun, 3 Apr 2022 18:00:39 +0000 Subject: [PATCH] StreamSB Fix (#900) --- .../lagradost/cloudstream3/extractors/StreamSB.kt | 2 +- .../cloudstream3/movieproviders/BflixProvider.kt | 14 ++++++++++---- docs/providers.json | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/StreamSB.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/StreamSB.kt index ac5a0a8e..138a6455 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/extractors/StreamSB.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/StreamSB.kt @@ -92,7 +92,7 @@ open class StreamSB : ExtractorApi() { }.first() val bytes = id.toByteArray() val bytesToHex = bytesToHex(bytes) - val master = "$mainUrl/sources41/6d6144797752744a454267617c7c${bytesToHex.lowercase()}7c7c4e61755a56456f34385243727c7c73747265616d7362/6b4a33767968506e4e71374f7c7c343837323439333133333462353935333633373836643638376337633462333634663539343137373761333635313533333835333763376333393636363133393635366136323733343435323332376137633763373337343732363536313664373336327c7c504d754478413835306633797c7c73747265616d7362" + val master = "$mainUrl/sources43/6d6144797752744a454267617c7c${bytesToHex.lowercase()}7c7c4e61755a56456f34385243727c7c73747265616d7362/6b4a33767968506e4e71374f7c7c343837323439333133333462353935333633373836643638376337633462333634663539343137373761333635313533333835333763376333393636363133393635366136323733343435323332376137633763373337343732363536313664373336327c7c504d754478413835306633797c7c73747265616d7362" val headers = mapOf( "watchsb" to "streamsb", ) diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/BflixProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/BflixProvider.kt index 332fe94c..80a37f23 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/BflixProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/BflixProvider.kt @@ -17,7 +17,7 @@ class SflixProProvider : BflixProvider() { } open class BflixProvider() : MainAPI() { - override var mainUrl = "https://bflix.ru" + override var mainUrl = "https://bflix.to" override var name = "Bflix" override val hasMainPage = true override val hasChromecastSupport = true @@ -43,7 +43,8 @@ open class BflixProvider() : MainAPI() { val test = soup.select(element).map { val title = it.selectFirst("h3 a").text() val link = fixUrl(it.selectFirst("a").attr("href")) - // val quality = it.selectFirst("div.quality").text() + val qualityInfo = it.selectFirst("div.quality").text() + val quality = getQualityFromString(qualityInfo) TvSeriesSearchResponse( title, link, @@ -52,6 +53,7 @@ open class BflixProvider() : MainAPI() { it.selectFirst("a.poster img").attr("src"), null, null, + quality = quality ) } items.add(HomePageList(name, test)) @@ -178,6 +180,8 @@ open class BflixProvider() : MainAPI() { val href = fixUrl(it.selectFirst("a").attr("href")) val image = it.selectFirst("a.poster img").attr("src") val isMovie = href.contains("/movie/") + val qualityInfo = it.selectFirst("div.quality").text() + val quality = getQualityFromString(qualityInfo) if (isMovie) { MovieSearchResponse( @@ -186,7 +190,8 @@ open class BflixProvider() : MainAPI() { this.name, TvType.Movie, image, - null + null, + quality = quality ) } else { TvSeriesSearchResponse( @@ -196,7 +201,8 @@ open class BflixProvider() : MainAPI() { TvType.TvSeries, image, null, - null + null, + quality = quality ) } } diff --git a/docs/providers.json b/docs/providers.json index da8c8e8e..4a3888d9 100644 --- a/docs/providers.json +++ b/docs/providers.json @@ -51,7 +51,7 @@ }, "BflixProvider": { "name": "Bflix", - "url": "https://bflix.ru", + "url": "https://bflix.to", "status": 1 }, "FmoviesToProvider": {