pixelead0 / tmdb_v3-PHP-API-

Wrapper in PHP for The Movie Data Base version 3
119 stars 82 forks source link

Trailer in TV Show #70

Open ChrisTERiS opened 4 years ago

ChrisTERiS commented 4 years ago

Have copied the code below from Movie class to TVShow class and then I tried to display it on the page with $tvShow->getTrailer(); but nothing appear there. I know that this will (if) display only the filename, but is ok for me.

` /**

Maybe it needs to add somewhere append_to_response=video or something else? If yes, where is that declaration?

Thank you Chris

bogdanfinn commented 4 years ago

@ChrisTERiS For TVShows you probably have more than one Trailer. Sometimes one for each season.

Added a getTrailers() to TVShows and extended the examples on my fork. Will create a merge request soon.

ChrisTERiS commented 4 years ago

@ChrisTERiS For TVShows you probably have more than one Trailer. Sometimes one for each season.

Added a getTrailers() to TVShows and extended the examples on my fork. Will create a merge request soon.

Yes, you're right. Don't remember if I read it at TMDb site but now except the "Trailer", have video types "Teaser" and "Behind the scene".

With my experience, I believe that the "Teaser" type is the good one if someone want to show just one video. Teaser is the global video for a TV Show while Trailers can be one per episode.

Thank you for your help. I'll wait the improved version.

ChrisTERiS commented 4 years ago

@ChrisTERiS For TVShows you probably have more than one Trailer. Sometimes one for each season.

Added a getTrailers() to TVShows and extended the examples on my fork. Will create a merge request soon.

Just seen in your link before that you had already post the changes. I did all the changes, except the one in configuration/all.php as video already exist as parameter at the end of the line.

Now the link to trailer works, but as I want to display it inline the page, I'll use $trailer['key'] for it.

Thank you so much for your help. Really appreciated !!