From efa762349546cfeffb9fd4c2c78e0e11bc01539b Mon Sep 17 00:00:00 2001 From: LagradOst <11805592+LagradOst@users.noreply.github.com> Date: Fri, 17 Jun 2022 19:37:06 +0200 Subject: [PATCH] minifix --- app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt index 823c62b5..5fe0802e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt @@ -901,8 +901,12 @@ interface LoadResponse { /**better to call addTrailer with mutible trailers directly instead of calling this multiple times*/ suspend fun LoadResponse.addTrailer(trailerUrl: String?, referer: String? = null) { if (trailerUrl == null) return - val newTrailers = loadExtractor(trailerUrl, referer) - addTrailer(newTrailers) + try { + val newTrailers = loadExtractor(trailerUrl, referer) + addTrailer(newTrailers) + } catch (e: Exception) { + logError(e) + } } fun LoadResponse.addTrailer(newTrailers: List) {