mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update TmdbProvider.kt
This commit is contained in:
parent
504258bf15
commit
3a001b2fcc
1 changed files with 4 additions and 4 deletions
|
@ -27,10 +27,10 @@ data class TmdbLink(
|
||||||
|
|
||||||
open class TmdbProvider : MainAPI() {
|
open class TmdbProvider : MainAPI() {
|
||||||
// This should always be false, but might as well make it easier for forks
|
// This should always be false, but might as well make it easier for forks
|
||||||
open val includeAdult = false
|
open val includeAdult = true
|
||||||
|
|
||||||
// Use the LoadResponse from the metadata provider
|
// Use the LoadResponse from the metadata provider
|
||||||
open val useMetaLoadResponse = false
|
open val useMetaLoadResponse = true
|
||||||
open val apiName = "TMDB"
|
open val apiName = "TMDB"
|
||||||
|
|
||||||
// As some sites doesn't support s0
|
// As some sites doesn't support s0
|
||||||
|
@ -73,7 +73,7 @@ open class TmdbProvider : MainAPI() {
|
||||||
private fun BaseMovie.toSearchResponse(): MovieSearchResponse {
|
private fun BaseMovie.toSearchResponse(): MovieSearchResponse {
|
||||||
return MovieSearchResponse(
|
return MovieSearchResponse(
|
||||||
this.title ?: this.original_title,
|
this.title ?: this.original_title,
|
||||||
getUrl(id, false),
|
getUrl(id, true),
|
||||||
apiName,
|
apiName,
|
||||||
TvType.TvSeries,
|
TvType.TvSeries,
|
||||||
getImageUrl(this.poster_path),
|
getImageUrl(this.poster_path),
|
||||||
|
@ -169,7 +169,7 @@ open class TmdbProvider : MainAPI() {
|
||||||
|
|
||||||
private suspend fun Movie.toLoadResponse(): MovieLoadResponse {
|
private suspend fun Movie.toLoadResponse(): MovieLoadResponse {
|
||||||
return newMovieLoadResponse(
|
return newMovieLoadResponse(
|
||||||
this.title ?: this.original_title, getUrl(id, false), TvType.Movie, TmdbLink(
|
this.title ?: this.original_title, getUrl(id, true), TvType.Movie, TmdbLink(
|
||||||
this.imdb_id,
|
this.imdb_id,
|
||||||
this.id,
|
this.id,
|
||||||
null,
|
null,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue