added random trailer into Sora

This commit is contained in:
hexated 2022-10-28 10:58:55 +07:00
parent aa6ed888c0
commit bb3f40ab1a

View file

@ -208,7 +208,7 @@ open class SoraStream : TmdbProvider() {
val recommendations = val recommendations =
responses.recommandations?.mapNotNull { media -> media.toSearchResponse() } responses.recommandations?.mapNotNull { media -> media.toSearchResponse() }
val trailer = responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.first() val trailer = responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.random()
return if (type == TvType.TvSeries) { return if (type == TvType.TvSeries) {
val episodes = mutableListOf<Episode>() val episodes = mutableListOf<Episode>()