תמיכת The Movie Database

Hey there, I'm having some trouble figuring out how to get the crew to appear the same way TMDb displays it. It's easy enough for cast because of the order key, but there is no similar key for crew.

For example, look at the "Featured crew" here: https://www.themoviedb.org/movie/329865-arrival

But when I query the same crew via the API it returns the entire known crew, so my list is populated with "property master" etc.

How can I replicate the way TMDb returns crew via the API?

3 תגובות (בדף 1 מתוך 1)

Jump to last post

Hi @gmask

That is true, there is no API method for this. All I am doing on the website is grabbing the director and writers (screenplay, story and writer) from the crew members. You can easily filter through the array and grab whatever jobs you think are important like I do.

Hi @travisbell

Thanks for getting back to me. So I implemented a filter and just grabbed ['Director', 'Writer', 'Story', 'Screenplay'] jobs, but found it's not really enough because of movies like Inside Out: https://www.themoviedb.org/movie/150540-inside-out

Where the same person may have multiple jobs. Your handling of it is much nicer, whereas mine just returns Pete Doctor three times with different jobs. It occurs to me I could create a new array and just merge on the credit id May I ask what language you've written TMDb in, and how you handle this case? I'm writing my app in PHP.

One more unrelated note: I've noticed the Now Playing, Upcoming, Popular, and Top Rated methods do not return an imdb_id even though they appear to reference the same object as the Get Details method, is there a specific reason it's like this? I'd personally use it.

Anyway I just want to say thanks a lot for all the work you've put into this, I love your API, the dev community is lucky to have you.

So I implemented a filter and just grabbed ['Director', 'Writer', 'Story', 'Screenplay'] jobs, but found it's not really enough because of movies like Inside Out

Good call. There is a little extra polish I'm putting on there. After I get the job records, I group them by person to join all of their jobs together. Then I just comma separate the list of job names. There's actually one more outstanding ticket I have to do on this which is order them by director first. I totally forgot but I never got to that last task.

May I ask what language you've written TMDb in, and how you handle this case? I'm writing my app in PHP.

TMDb is written in 2 languages, the website is Ruby and the API is about 50/50 Ruby/Lua. Lots of the website features consume the API directly now days though, so it's really both languages. Front end website is still 100% Ruby though.

I've noticed the Now Playing, Upcoming, Popular, and Top Rated methods do not return an imdb_id even though they appear to reference the same object as the Get Details method, is there a specific reason it's like this? I'd personally use it.

None of our list methods (search, popular, top rated, etc...) return any external ids. This is by design because I didn't want to get in the game of saying if the IMDB ID is present, why isn't the TVDB ID? And people have social ids now (Twitter, Facebook, Instagram) so one person might find it useful to only have Twitter while others want Facebook. You probably get the idea now, too much data that is unique to each application.

Anyway I just want to say thanks a lot for all the work you've put into this, I love your API, the dev community is lucky to have you.

Thanks so much for saying so!

.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם

עולמי

s התמקד בשורת החיפוש
p פתח תפריט פרופיל
esc סגור חלון פתוח
? פתח חלון קיצורי דרך של מקלדת

בדפי מדיה

b לך חזרה (או אל הורה אם ישים)
e לך אל דף עריכה

בדפי עונות

(חץ ימני) לך אל העונה הבאה
(חץ שמאלי) לך אל העונה הקודמת

בדפי סדרות

(חץ ימני) לך אל הפרק הבא
(חץ שמאלי) לך אל הפרק הקודם

בכל דפי תמונה

a פתח חלון הוספת תמונה

בכל דפי עריכה

t פתח בוחר תרגום
ctrl+ s הגש טופס

בדפי דיון

n צור דיון חדש
w עורר מעמד צפייה
p עורר ציבורי/פרטי
c עורר סגירה/פתיחה
a פתח פעילות
r השב אל דיון
l לך אל תשובה אחרונה
ctrl+ enter הגש את הודעתך
(חץ ימני) הדף הבא
(חץ שמאלי) הדף הקודם

הגדרות

?רוצה לדרג או להוסיף פריט אל רשימה

היכנס