mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed poster in detail sora
This commit is contained in:
parent
5ebced9262
commit
67ce566dfd
2 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 20
|
version = 21
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -119,6 +119,11 @@ open class SoraStream : TmdbProvider() {
|
||||||
return if (link.startsWith("/")) "https://image.tmdb.org/t/p/w500/$link" else link
|
return if (link.startsWith("/")) "https://image.tmdb.org/t/p/w500/$link" else link
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getOriImageUrl(link: String?): String? {
|
||||||
|
if (link == null) return null
|
||||||
|
return if (link.startsWith("/")) "https://image.tmdb.org/t/p/original/$link" else link
|
||||||
|
}
|
||||||
|
|
||||||
override suspend fun getMainPage(
|
override suspend fun getMainPage(
|
||||||
page: Int,
|
page: Int,
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
|
@ -268,7 +273,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
episodes
|
episodes
|
||||||
) {
|
) {
|
||||||
this.posterUrl = getImageUrl(res.posterPath)
|
this.posterUrl = getOriImageUrl(res.backdropPath)
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = res.overview
|
this.plot = res.overview
|
||||||
this.tags = res.genres?.mapNotNull { it.name }
|
this.tags = res.genres?.mapNotNull { it.name }
|
||||||
|
@ -290,7 +295,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
year = year,
|
year = year,
|
||||||
).toJson(),
|
).toJson(),
|
||||||
) {
|
) {
|
||||||
this.posterUrl = getImageUrl(res.posterPath)
|
this.posterUrl = getOriImageUrl(res.backdropPath)
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = res.overview
|
this.plot = res.overview
|
||||||
this.tags = res.genres?.mapNotNull { it.name }
|
this.tags = res.genres?.mapNotNull { it.name }
|
||||||
|
@ -516,6 +521,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
@JsonProperty("original_title") val originalTitle: String? = null,
|
@JsonProperty("original_title") val originalTitle: String? = null,
|
||||||
@JsonProperty("original_name") val originalName: String? = null,
|
@JsonProperty("original_name") val originalName: String? = null,
|
||||||
@JsonProperty("poster_path") val posterPath: String? = null,
|
@JsonProperty("poster_path") val posterPath: String? = null,
|
||||||
|
@JsonProperty("backdrop_path") val backdropPath: String? = null,
|
||||||
@JsonProperty("release_date") val releaseDate: String? = null,
|
@JsonProperty("release_date") val releaseDate: String? = null,
|
||||||
@JsonProperty("first_air_date") val firstAirDate: String? = null,
|
@JsonProperty("first_air_date") val firstAirDate: String? = null,
|
||||||
@JsonProperty("overview") val overview: String? = null,
|
@JsonProperty("overview") val overview: String? = null,
|
||||||
|
|
Loading…
Reference in a new issue