Wsparcie The Movie Database

Hi Travis,

1) Will this link http://files.tmdb.org/p/exports/movie_ids_04_28_2017.json.gz always give me the most updated version containing the latest added movies?

2) When a new movie is added in the file, is it always added at the end of the file or might it be added anywhere in the file?

Thanks :)

17 odpowiedzi (strona 1 z 2)

Jump to last post

Następna stronaOstatnia strona

Hi there,

1) Will this link http://files.tmdb.org/p/exports/movie_ids_04_28_2017.json.gz always give me the most updated version containing the latest added movies?

No. You need to query the current days export if you want the most recent export. movie_ids_03_21_2018.json.gz for today, as an example.

2) When a new movie is added in the file, is it always added at the end of the file or might it be added anywhere in the file?

I don't think the ids in the file are contiguous. This is because the file is written asynchronously with multiple workers. Therefore it is possible any one of those workers finishes before another one that is writing ids farther down the ID space.

I am not really concerned with the id order. What I want to know is the position in the file that the movies are added.

So for example if 5 movies are added in today's file, will that be the last 5 lines of the file? Or could they be added at any line in the 300,000+ lines?

If I compare today's file and yesterday's file, will the last 5 lines be the only difference?

So for example if 5 movies are added in today's file, will that be the last 5 lines of the file? Or could they be added at any line in the 300,000+ lines?

I believe they could be anywhere.

Hi again Travis,

I wasn't sure whether to open a new discussion but as my question is similar I thought it was better to reopen this one.

I have stored the movies in my database which I got from the daily export file. Now the next step I want to perform is an 'update' action to update the database with new movies and update any changed data of the existing ones.

1) Is there a way to get the new movies directly, or is the only way by comparing today's daily export file to find the movies that don't exist in yesterday's?

2) Reading through the API docs I think updating the movies already added in my database can be done with GET /movie/changes & GET /movie/{movie_id}/changes, but I wanted to make sure I understood correctly.

  • GET /movie/changes will give me a list of ids that are the ids of the movies that have one or more attributes changed

  • And then using that list, GET /movie/{movie_id}/changes will give me the specific attribute(s) of the movie that changed

Thanks in advance!

Is there a way to get the new movies directly, or is the only way by comparing today's daily export file to find the movies that don't exist in yesterday's?

Diffing the two files is probably the easiest. If it's something you are going to run daily, the other way would be to query the /movie/latest method and compare the value from the day before. The difference in 24 hours won't be too high, and iterating over just those ids would be easy as well.

Reading through the API docs I think updating the movies already added in my database can be done with GET /movie/changes & GET /movie/{movie_id}/changes, but I wanted to make sure I understood correctly.

Yes, that's correct.

Thanks for clarifying.

So reading the docs, I understand that /movie/latest returns only the latest movie. So the result will always be just 1 movie. Am I wrong? Does it return a list of all the movie ids that have been added in the last 24 hours?

Yes it's just a single id. What I was saying is that in a 24 hour period let's say ~170 movies get created. And by checking the latest at the same time every day you can built a simple tool to stay in sync:

  • March 31 - 515323
  • April 1 - 515493
  • April 2 - 515663

You know on April 2 that you only need to start at id 515493 and iterate up to 515663 to get check the newly created items. Iterating over 170 items a night is not very much.

Oh ok yeah that makes sense now thanks!

One more question, how often does the popularity of movies and people get updated?

No problem sunglasses

Popularity is updated every day. For ingesting popularity data, the easiest way would definitely be the ID exports.

Ok thanks :)

  1. Is the popularity linked between the movies? (in order for a movie's popularity to increase, another one's has to decrease?)

  2. If that's the case, doesn't this mean that since popularity gets updated every day, all movies would have their popularity updated and hence all be returned when using movie/changes ?

But clearly this is not the case so I'm missing something...

Is the popularity linked between the movies? (in order for a movie's popularity to increase, another one's has to decrease?)

No. It's an unbounded value that is solely tied to the data we track for popularity. That is detailed here.

If that's the case, doesn't this mean that since popularity gets updated every day, all movies would have their popularity updated and hence all be returned when using movie/changes ?

Changes tracks data changes only. Popularity is not tracked like that. It's just a value that goes up and down.

Ok so the only way to get the updated popularity is to get the value in the daily export? I am concerned because iterating through all the data daily is very difficult!

The current values are also available on the get details method. Those are the two best ways.

Ok thanks for the clarification!

Nie możesz znaleźć filmu lub serialu? Zaloguj się, aby go utworzyć.

Globalny

s zaznacz pasek wyszukiwania
p otwórz menu profilu
esc Zamknij otwarte okno
? otwórz okno skrótów klawiszowych

On media pages

b go back (or to parent when applicable)
e przejdź do strony edycji

On TV season pages

(prawa strzałka) przejdź do następnego sezonu
(lewa strzałka) przejdź do poprzedniego sezonu

On TV episode pages

(prawa strzałka) przejdź do następnego odcinka
(lewa strzałka) przejdź do poprzedniego odcinka

On all image pages

a otwórz okno dodawania obrazu

On all edit pages

t open translation selector
ctrl+ s prześlij formularz

On discussion pages

n otwórz nową dyskusję
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r odpowiedz na dyskusję
l przejdź do ostatniej odpowiedzi
ctrl+ enter wyślij swoją wiadomość
(prawa strzałka) następna strona
(lewa strzałka) poprzednia strona

Ustawienia

Want to rate or add this item to a list?

Zaloguj