Update TmdbProvider.kt

This commit is contained in:
Manna Huizar 2023-10-25 09:20:32 -05:00 committed by GitHub
parent 504258bf15
commit 3a001b2fcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,