From ac17b904b7a7d912464f83c5e17ef24a8171f610 Mon Sep 17 00:00:00 2001 From: LagradOst Date: Mon, 27 Dec 2021 18:43:15 +0100 Subject: [PATCH] fixed crash and readded trailers.to --- app/build.gradle | 4 ++-- app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt | 4 ++-- .../java/com/lagradost/cloudstream3/mvvm/ArchComponentExt.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c3da0e92..e1c4392b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,8 +35,8 @@ android { minSdkVersion 21 targetSdkVersion 30 - versionCode 39 - versionName "2.4.7" + versionCode 40 + versionName "2.4.8" resValue "string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}" diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt index bc9e21ed..7deaddef 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt @@ -64,7 +64,8 @@ object APIHolder { ZoroProvider(), PinoyMoviePediaProvider(), PinoyHDXyzProvider(), - PinoyMoviesEsProvider() + PinoyMoviesEsProvider(), + TrailersTwoProvider(), ) val restrictedApis = arrayListOf( @@ -76,7 +77,6 @@ object APIHolder { private val backwardsCompatibleProviders = arrayListOf( KawaiifuProvider(), // removed due to cloudflare - TrailersTwoProvider(), // removed due to no videos working ) fun getApiFromName(apiName: String?): MainAPI { diff --git a/app/src/main/java/com/lagradost/cloudstream3/mvvm/ArchComponentExt.kt b/app/src/main/java/com/lagradost/cloudstream3/mvvm/ArchComponentExt.kt index feac20fc..e15d7a16 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/mvvm/ArchComponentExt.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/mvvm/ArchComponentExt.kt @@ -71,7 +71,7 @@ suspend fun safeApiCall( when (throwable) { is NullPointerException -> { 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( false, null,