jellyfin / TMDbLib

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

MediaType for episode changes to tv_episode #414

Closed danimart1991 closed 9 months ago

danimart1991 commented 1 year ago

Actually media_type parser for Episodes value is episode. But it seems TMDB changes that value to tv_episode as could be seen here:

_https://api.themoviedb.org/3/find/366211?api_key=YOUR_API_KEY&external_source=tvdb_id_

{
  "movie_results": [],
  "person_results": [],
  "tv_results": [
    {
      "adult": false,
      "backdrop_path": "/6KyJeOW7vTW0czdR0S6wzXAcfmw.jpg",
      "id": 90802,
      "name": "The Sandman",
      "original_language": "en",
      "original_name": "The Sandman",
      "overview": "After years of imprisonment, Morpheus — the King of Dreams — embarks on a journey across worlds to find what was stolen from him and restore his power.",
      "poster_path": "/q54qEgagGOYCq5D1903eBVMNkbo.jpg",
      "media_type": "tv",
      "genre_ids": [
        10765,
        18
      ],
      "popularity": 341.25,
      "first_air_date": "2022-08-05",
      "vote_average": 8.091,
      "vote_count": 138,
      "origin_country": [
        "US"
      ]
    }
  ],
  "tv_episode_results": [
    {
      "id": 73344,
      "name": "Episode 610A",
      "overview": "The mirror ball trophy is awarded and all the eliminated celebrities return for one last spin across the dance floor.",
      "media_type": "tv_episode",
      "vote_average": 0,
      "vote_count": 0,
      "air_date": "2008-05-20",
      "episode_number": 20,
      "production_code": "",
      "runtime": null,
      "season_number": 6,
      "show_id": 1508,
      "still_path": null
    }
  ],
  "tv_season_results": []
}

I don't know if only affects to TVDB find or any other endpoint.

This cause an exception on FindAsync Method: TmdbClient.FindAsync(FindExternalSource.TvDb, "366211").Result