KevinMidboe / seasonedShows

seasoned api 🌶 | Season your media library with the shows and movies that you and your friends want
MIT License
2 stars 0 forks source link

Handle genres for tmdb #78

Open KevinMidboe opened 6 years ago

KevinMidboe commented 6 years ago

When calling tmdb/search and tmdb/id (lookup) we get two different JSON attributes for genres. When we do a lookup of a movie we get a object with id and name:

genres: [
  { id: 53, name: 'Thriller' },
  { id: 18, name: 'Drama' },
  { id: 878, name: 'Science Fiction' },
  { id: 9648, name: 'Mystery' }
]

but when we search we only get a list of id:

genre_ids: [ 
  28, 
  53,
  878
]

We want to be able to get the genre as name in both cases.

KevinMidboe commented 6 years ago

List of endpoints in the tmdb library node uses. https://github.com/impronunciable/moviedb/blob/master/lib/endpoints.json