golang-tmdb icon indicating copy to clipboard operation
golang-tmdb copied to clipboard

Movie lists are missing `genre_ids`

Open CIAvash opened this issue 1 month ago • 4 comments

Describe the bug Upcoming, Now Playing, Popular and Top Rated have genre_ids, but they are missing in golang-tmdb. Instead their struct has Genres which will be empty.

To Reproduce Steps to reproduce the behavior:

  1. Call any of the mentioned lists: upcoming, _ := tmdbClient.GetMovieUpcoming(nil)
  2. Try to access GenreIDs: upcoming.Results[0].GenreIDs
  3. You get a missing field error for GenreIDs
  4. Instead Genres field exists but of course won't have the genres

Expected behavior Field GenreIDs should exist and return the list of genre IDs.

Desktop (please complete the following information):

  • OS: Linux
  • Go Version: 1.25.4

Additional context Reference: https://developer.themoviedb.org/reference/movie-upcoming-list

CIAvash avatar Nov 16 '25 06:11 CIAvash

Thanks for reporting this bug. I’ll investigate.

cyruzin avatar Nov 18 '25 13:11 cyruzin

This issue has been fixed on #90

cyruzin avatar Nov 20 '25 04:11 cyruzin

Thanks, I think MoviePopularResults needs to be changed as well, it's used by both MoviePopular and MovieTopRated https://github.com/cyruzin/golang-tmdb/blob/bd87c9a94bd61b9178e41a07a22f64318f4a7b66/results.go#L407

CIAvash avatar Nov 20 '25 06:11 CIAvash

Thanks, I think MoviePopularResults needs to be changed as well, it's used by both MoviePopular and MovieTopRated

golang-tmdb/results.go

Line 407 in bd87c9a

Genres []Genre json:"genres"

I reopened this issue to fix this. Thanks.

cyruzin avatar Nov 24 '25 00:11 cyruzin

@CIAvash fixed on https://github.com/cyruzin/golang-tmdb/pull/91

cyruzin avatar Dec 10 '25 22:12 cyruzin