yet another StreamingCommunity Fix... (#82)

Co-authored-by: contusionglory <102427829+contusionglory@users.noreply.github.com>
This commit is contained in:
antonydp 2023-02-03 01:22:51 +01:00 committed by GitHub
parent 4fc0e3ce4b
commit f456a7cc92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 5 version = 6
cloudstream { cloudstream {

View file

@ -180,10 +180,14 @@ class StreamingcommunityProvider : MainAPI() {
private suspend fun VideoElement.toSearchResponse(): MovieSearchResponse { private suspend fun VideoElement.toSearchResponse(): MovieSearchResponse {
val id = this.id val id = this.id
val name = this.slug val name = this.slug
val img = this.images[0].url val img = this.images.firstOrNull()
val posterUrl = if (img != null){
val number = translateNumber(this.images[0].serverID.toInt()) val number = translateNumber(this.images[0].serverID.toInt())
val ip = translateIp(this.images[0].proxyID.toInt()) val ip = translateIp(this.images[0].proxyID.toInt())
val posterUrl = "https://$ip/images/$number/$img" "https://$ip/images/$number/${img.url}"
} else {
""
}
val videoUrl = "$mainUrl/titles/$id-$name" val videoUrl = "$mainUrl/titles/$id-$name"
//posterMap[videourl] = posterurl //posterMap[videourl] = posterurl
val data = app.post( val data = app.post(