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
targetSdkVersion 30
versionCode 39
versionName "2.4.7"
versionCode 40
versionName "2.4.8"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -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 {

View file

@ -71,7 +71,7 @@ suspend fun <T> 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,