Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ android {

defaultConfig {
applicationId = "com.lagradost.cloudstream3"
minSdk = libs.versions.minSdk.get().toInt()
minSdk = 28
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = libs.versions.versionCode.get().toInt()
versionName = libs.versions.versionName.get()
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.content.SharedPreferences
import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Rect
import android.os.Build
import android.os.Bundle
import android.util.AttributeSet
import android.util.Log
Expand Down Expand Up @@ -1178,6 +1179,9 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
}

override fun onCreate(savedInstanceState: Bundle?) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
throw UnsupportedOperationException("Nuh uh")
}
app.initClient(this, ignoreSSL = false)
@OptIn(UnsafeSSL::class)
insecureApp.initClient(this, ignoreSSL = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package com.lagradost.cloudstream3

import android.os.Build
import com.fasterxml.jackson.annotation.JsonAutoDetect
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.DeserializationFeature
Expand Down Expand Up @@ -438,6 +439,11 @@ fun newHomePageResponse(
list: List<SearchResponse>,
hasNext: Boolean? = null,
): HomePageResponse {
@Suppress("DEPRECATION_ERROR")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return HomePageResponse(listOf(), hasNext = false)
}

@Suppress("DEPRECATION_ERROR")
return HomePageResponse(
listOf(HomePageList(name, list)),
Expand All @@ -450,6 +456,11 @@ fun newHomePageResponse(
list: List<SearchResponse>,
hasNext: Boolean? = null,
): HomePageResponse {
@Suppress("DEPRECATION_ERROR")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return HomePageResponse(listOf(), hasNext = false)
}

@Suppress("DEPRECATION_ERROR")
return HomePageResponse(
listOf(HomePageList(data.name, list, data.horizontalImages)),
Expand All @@ -458,11 +469,21 @@ fun newHomePageResponse(
}

fun newHomePageResponse(list: HomePageList, hasNext: Boolean? = null): HomePageResponse {
@Suppress("DEPRECATION_ERROR")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return HomePageResponse(listOf(), hasNext = false)
}

@Suppress("DEPRECATION_ERROR")
return HomePageResponse(listOf(list), hasNext = hasNext ?: list.list.isNotEmpty())
}

fun newHomePageResponse(list: List<HomePageList>, hasNext: Boolean? = null): HomePageResponse {
@Suppress("DEPRECATION_ERROR")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return HomePageResponse(listOf(), hasNext = false)
}

@Suppress("DEPRECATION_ERROR")
return HomePageResponse(list, hasNext = hasNext ?: list.any { it.list.isNotEmpty() })
}
Expand All @@ -471,6 +492,11 @@ fun newSearchResponseList(
list: List<SearchResponse>,
hasNext: Boolean? = null,
): SearchResponseList {
@Suppress("DEPRECATION_ERROR")
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
return SearchResponseList(listOf(), hasNext = false)
}

@Suppress("DEPRECATION_ERROR")
return SearchResponseList(
list,
Expand Down
Loading