diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt
index f5c05bbb..b3125e64 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt
@@ -556,6 +556,35 @@ enum class SearchQuality {
HD,
BlueRay,
DVD,
+ SD,
+ FourK,
+ UHD,
+}
+
+/**Add anything to here if you find a site that uses some specific naming convention*/
+fun getQualityFromString(string: String?) : SearchQuality? {
+ val check = (string ?: return null).trim().lowercase().replace(" ","")
+
+ return when(check) {
+ "cam" -> SearchQuality.Cam
+ "hdcam" -> SearchQuality.HdCam
+ "hq" -> SearchQuality.HQ
+ "hdrip" -> SearchQuality.HD
+ "hd" -> SearchQuality.HD
+ "camrip" -> SearchQuality.CamRip
+ "rip" -> SearchQuality.CamRip
+ "tc" -> SearchQuality.Telecine
+ "ts" -> SearchQuality.Telesync
+ "dvd" -> SearchQuality.DVD
+ "blueray" -> SearchQuality.BlueRay
+ "sd" -> SearchQuality.SD
+ "4k" -> SearchQuality.FourK
+ "uhd" -> SearchQuality.UHD // may also be 4k or 8k
+ "blue" -> SearchQuality.BlueRay
+ "wp" -> SearchQuality.WorkPrint
+ "workprint" -> SearchQuality.WorkPrint
+ else -> null
+ }
}
interface SearchResponse {
diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/SflixProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/SflixProvider.kt
index 24399e64..98433478 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/SflixProvider.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/SflixProvider.kt
@@ -25,12 +25,13 @@ class DopeboxProvider : SflixProvider() {
override var mainUrl = "https://dopebox.to"
override var name = "Dopebox"
}
+
class SolarmovieProvider : SflixProvider() {
override var mainUrl = "https://solarmovie.pe"
override var name = "Solarmovie"
}
-open class SflixProvider() : MainAPI() {
+open class SflixProvider : MainAPI() {
override var mainUrl = "https://sflix.to"
override var name = "Sflix.to"
@@ -87,6 +88,10 @@ open class SflixProvider() : MainAPI() {
val image = it.select("img").attr("data-src")
val isMovie = href.contains("/movie/")
+ val metaInfo = it.select("div.fd-infor > span.fdi-item")
+ // val rating = metaInfo[0].text()
+ val quality = getQualityFromString(metaInfo?.getOrNull(1)?.text())
+
if (isMovie) {
MovieSearchResponse(
title,
@@ -94,7 +99,8 @@ open class SflixProvider() : MainAPI() {
this.name,
TvType.Movie,
image,
- year
+ year,
+ quality = quality
)
} else {
TvSeriesSearchResponse(
@@ -104,7 +110,8 @@ open class SflixProvider() : MainAPI() {
TvType.TvSeries,
image,
year,
- null
+ null,
+ quality = quality
)
}
}
diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchResultBuilder.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchResultBuilder.kt
index 8d9813e9..78abb867 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchResultBuilder.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchResultBuilder.kt
@@ -33,6 +33,7 @@ object SearchResultBuilder {
val textIsDub: TextView? = itemView.text_is_dub
val textIsSub: TextView? = itemView.text_is_sub
+ val textQuality: TextView? = itemView.text_quality
val bg: CardView = itemView.backgroundCard
@@ -46,6 +47,28 @@ object SearchResultBuilder {
textIsDub?.isVisible = false
textIsSub?.isVisible = false
+ when(card.quality) {
+ SearchQuality.BlueRay -> R.string.quality_blueray
+ SearchQuality.Cam -> R.string.quality_cam
+ SearchQuality.CamRip -> R.string.quality_cam_rip
+ SearchQuality.DVD -> R.string.quality_dvd
+ SearchQuality.HD -> R.string.quality_hd
+ SearchQuality.HQ -> R.string.quality_hq
+ SearchQuality.HdCam -> R.string.quality_cam_hd
+ SearchQuality.Telecine -> R.string.quality_tc
+ SearchQuality.Telesync -> R.string.quality_ts
+ SearchQuality.WorkPrint -> R.string.quality_workprint
+ SearchQuality.SD -> R.string.quality_sd
+ SearchQuality.FourK -> R.string.quality_4k
+ SearchQuality.UHD -> R.string.quality_uhd
+ else -> null
+ }?.let { textRes ->
+ textQuality?.setText(textRes)
+ textQuality?.isVisible = true
+ } ?: run {
+ textQuality?.isVisible = false
+ }
+
cardText?.text = card.name
cardView.isVisible = true
diff --git a/app/src/main/res/drawable/dub_bg_color.xml b/app/src/main/res/drawable/dub_bg_color.xml
index 16807981..b9e42a2c 100644
--- a/app/src/main/res/drawable/dub_bg_color.xml
+++ b/app/src/main/res/drawable/dub_bg_color.xml
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/sub_bg_color.xml b/app/src/main/res/drawable/sub_bg_color.xml
index 6e55d47e..cd59f161 100644
--- a/app/src/main/res/drawable/sub_bg_color.xml
+++ b/app/src/main/res/drawable/sub_bg_color.xml
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/type_bg_color.xml b/app/src/main/res/drawable/type_bg_color.xml
index 40d221bb..674d6e60 100644
--- a/app/src/main/res/drawable/type_bg_color.xml
+++ b/app/src/main/res/drawable/type_bg_color.xml
@@ -2,5 +2,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/home_result_grid.xml b/app/src/main/res/layout/home_result_grid.xml
index 4ffa1eac..55b9c3f6 100644
--- a/app/src/main/res/layout/home_result_grid.xml
+++ b/app/src/main/res/layout/home_result_grid.xml
@@ -84,6 +84,12 @@
android:layout_width="30dp"
android:layout_height="30dp">
-->
+
+
+ android:background="@drawable/dub_bg_color" />
+ android:background="@drawable/sub_bg_color" />
diff --git a/app/src/main/res/layout/search_result_grid.xml b/app/src/main/res/layout/search_result_grid.xml
index 55276504..11d0a441 100644
--- a/app/src/main/res/layout/search_result_grid.xml
+++ b/app/src/main/res/layout/search_result_grid.xml
@@ -55,81 +55,31 @@
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:ellipsize="end" />
-
-
-
-
-
-
+ style="@style/SearchBox"
+ android:background="@drawable/dub_bg_color" />
+ style="@style/SearchBox"
+ android:background="@drawable/sub_bg_color" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 19e26831..bf88d643 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -433,6 +433,7 @@
Source
Coming soon…
+
Cam
Cam
Cam
@@ -443,5 +444,9 @@
BlueRay
WP
DVD
+ 4K
+ SD
+ UHD
+
Poster Image
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 8527d4bc..7a7a334f 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -321,6 +321,21 @@
- bold
+
+