fixed crash and readded trailers.to

This commit is contained in:
LagradOst 2021-12-27 18:43:15 +01:00
parent 830871682f
commit ac17b904b7
3 changed files with 5 additions and 5 deletions

View file

@ -35,8 +35,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 39 versionCode 40
versionName "2.4.7" versionName "2.4.8"
resValue "string", "app_version", resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}" "${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -64,7 +64,8 @@ object APIHolder {
ZoroProvider(), ZoroProvider(),
PinoyMoviePediaProvider(), PinoyMoviePediaProvider(),
PinoyHDXyzProvider(), PinoyHDXyzProvider(),
PinoyMoviesEsProvider() PinoyMoviesEsProvider(),
TrailersTwoProvider(),
) )
val restrictedApis = arrayListOf( val restrictedApis = arrayListOf(
@ -76,7 +77,6 @@ object APIHolder {
private val backwardsCompatibleProviders = arrayListOf( private val backwardsCompatibleProviders = arrayListOf(
KawaiifuProvider(), // removed due to cloudflare KawaiifuProvider(), // removed due to cloudflare
TrailersTwoProvider(), // removed due to no videos working
) )
fun getApiFromName(apiName: String?): MainAPI { fun getApiFromName(apiName: String?): MainAPI {

View file

@ -71,7 +71,7 @@ suspend fun <T> safeApiCall(
when (throwable) { when (throwable) {
is NullPointerException -> { is NullPointerException -> {
for (line in throwable.stackTrace) { for (line in throwable.stackTrace) {
if (line.fileName.endsWith("provider.kt", ignoreCase = true)) { if (line?.fileName?.endsWith("provider.kt", ignoreCase = true) == true) {
return@withContext Resource.Failure( return@withContext Resource.Failure(
false, false,
null, null,