trakt / api-help

Trakt API docs at https://trakt.docs.apiary.io
183 stars 7 forks source link

Add TVDB id in Trakt person ids object #57

Closed igorissen closed 2 years ago

igorissen commented 5 years ago

Currently the API is returning for a person

{
  "character": "Daenerys Targaryen",
  "person": {
    "name": "Emilia Clarke",
    "ids": {
      "trakt": 436511,
      "slug": "emilia-clarke",
      "imdb": "nm3592338",
      "tmdb": 1223786,
      "tvrage": null
    }
  }
}

It would nice to add the TVDB id so that we could avoid doing something like this traktItem.person.name == tvdbItem.name to find the character image.

Here is the value returned by TVDB request https://api.thetvdb.com/series/121361/actors

{
      "id": 440976,
      "seriesId": 121361,
      "name": "Emilia Clarke",
      "role": "Daenerys Targaryen",
      "sortOrder": 1,
      "image": "actors/440976.jpg",
      "imageAuthor": 235,
      "imageAdded": "0000-00-00 00:00:00",
      "lastUpdated": "2019-03-04 11:02:18"
}

You'll need to handle different TVDB ids for one person (ex: Karen Page in Marvel's series)

rectifyer commented 5 years ago

We don't currently store the TVDB ID since we use TMDB for all actor info. I wonder if TMDB would be willing to add an external tvdb_id field like they have for TV shows? Now that TVDB seems to have improved their actor listings, I'll need to take another look if we can use them as an additional source for at least the ID value.

igorissen commented 5 years ago

To avoid doing 3 calls to get an image from an actor on TVDB, it's better to store the id Trakt side (only 2 calls).

TMDB side :

Trakt side :

@rectifyer what do you think ?

jonathanantoine commented 5 years ago

I would love to have this information too.

By the way @igorissen, I do it in only 2 calls :

  1. Get show/episode cast from trakt.
  2. Get show/episode cast from tmdb (including images).

I may be able to do it in only one call using only tmdb but I may hit the "request rate limit" of tmdb.

rectifyer commented 5 years ago

Following up on this. I think requesting that TMDB adds a new field for the TVDB ID is the best way to go. With the upcoming TVDB API changes, it seems like they will start using IDs to better keep track of people. If TMDB added an external ID (similar to what they do for TV shows) that would allow a ton of apps this info, plus Trakt would use it and start passing it along as well.

rectifyer commented 2 years ago

Closing this for now since TMDB doesn't have the TVDB ID field. That is the only way we'd be able to supply that ID since actors are 100% pulled from TMDB (for years now actually).