jellyfin / TMDbLib

C#.Net library for TheMovieDB
MIT License
344 stars 128 forks source link

TV show 'recommendations' and 'similar' as SearchContainer<SearchTv> #400

Closed angyanmark closed 1 year ago

angyanmark commented 2 years ago

This way it fits better to the API, and matches Movie.cs.

angyanmark commented 1 year ago

Hi, @LordMike!

It's been a while since I published this PR, could you take a look at it?

The only change I made is in the TvShow.cs file. I changed the type of the Recommendations and Similar properties from ResultContainer<TvShow> to SearchContainer<SearchTv>.

The API returns a paginated list in both cases, so a SearchContainer fits better. The returned items are also a SearchTv model, not a full TvShow. SearchContainer<SearchMovie> is also used in the Movie.cs file for both properties. With this change I can handle TV show recommendations and movie recommendations the same way, since both will be a SearchContainer<SearchMovieTvBase>.

Thanks!

LordMike commented 1 year ago

Looks good. Slight API change, but it's probably fine.