From de83a7884582031e0897ba2d4ca21cde28c73def Mon Sep 17 00:00:00 2001 From: CakesTwix Date: Fri, 9 Aug 2024 16:32:58 +0300 Subject: [PATCH] klontv: Fix crash in search items --- KlonTVProvider/src/main/kotlin/com/lagradost/KlonTVProvider.kt | 2 +- .../src/main/kotlin/com/lagradost/models/GeneralInfo.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KlonTVProvider/src/main/kotlin/com/lagradost/KlonTVProvider.kt b/KlonTVProvider/src/main/kotlin/com/lagradost/KlonTVProvider.kt index 805d287..617b04d 100644 --- a/KlonTVProvider/src/main/kotlin/com/lagradost/KlonTVProvider.kt +++ b/KlonTVProvider/src/main/kotlin/com/lagradost/KlonTVProvider.kt @@ -97,7 +97,7 @@ class KlonTVProvider : MainAPI() { // JSON val title = titleJson.name val poster = titleJson.image - val rating = titleJson.aggregateRating.ratingValue.toString().toRatingInt() + val rating = titleJson.aggregateRating?.ratingValue.toString().toRatingInt() val actors = titleJson.actor.map { it.name } // HTML diff --git a/KlonTVProvider/src/main/kotlin/com/lagradost/models/GeneralInfo.kt b/KlonTVProvider/src/main/kotlin/com/lagradost/models/GeneralInfo.kt index 3d33716..21cdaa1 100644 --- a/KlonTVProvider/src/main/kotlin/com/lagradost/models/GeneralInfo.kt +++ b/KlonTVProvider/src/main/kotlin/com/lagradost/models/GeneralInfo.kt @@ -13,7 +13,7 @@ data class GeneralInfo ( val director : List, val actor : List, val countryOfOrigin : List, - val aggregateRating : AggregateRating + val aggregateRating : AggregateRating?, ) data class Director (