diff --git a/StreamingcommunityProvider/build.gradle.kts b/StreamingcommunityProvider/build.gradle.kts index eb3acaa..d8dfaef 100644 --- a/StreamingcommunityProvider/build.gradle.kts +++ b/StreamingcommunityProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 5 +version = 6 cloudstream { diff --git a/StreamingcommunityProvider/src/main/kotlin/com/lagradost/StreamingcommunityProvider.kt b/StreamingcommunityProvider/src/main/kotlin/com/lagradost/StreamingcommunityProvider.kt index eabf85d..3e6175a 100644 --- a/StreamingcommunityProvider/src/main/kotlin/com/lagradost/StreamingcommunityProvider.kt +++ b/StreamingcommunityProvider/src/main/kotlin/com/lagradost/StreamingcommunityProvider.kt @@ -103,13 +103,13 @@ class StreamingcommunityProvider : MainAPI() { val href = "$mainUrl/watch/$sid?e=${ep.id}" val postImage = ep.images.firstOrNull()?.originalURL - newEpisode(href) { - this.name = ep.name - this.season = season - this.episode = ep.number.toInt() - this.description = ep.plot - this.posterUrl = postImage - } + newEpisode(href) { + this.name = ep.name + this.season = season + this.episode = ep.number.toInt() + this.description = ep.plot + this.posterUrl = postImage + } } }.flatten() @@ -180,10 +180,14 @@ class StreamingcommunityProvider : MainAPI() { private suspend fun VideoElement.toSearchResponse(): MovieSearchResponse { val id = this.id val name = this.slug - val img = this.images[0].url - val number = translateNumber(this.images[0].serverID.toInt()) - val ip = translateIp(this.images[0].proxyID.toInt()) - val posterUrl = "https://$ip/images/$number/$img" + val img = this.images.firstOrNull() + val posterUrl = if (img != null){ + val number = translateNumber(this.images[0].serverID.toInt()) + val ip = translateIp(this.images[0].proxyID.toInt()) + "https://$ip/images/$number/${img.url}" + } else { + "" + } val videoUrl = "$mainUrl/titles/$id-$name" //posterMap[videourl] = posterurl val data = app.post(