پشتیبانی پایگاه داده‌ فیلم

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 پاسخ (در صفحه 1 از 2)

Jump to last post

صفحه بعدیصفحه آخر

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!

فیلم و نمایش تلویزیونی را نمی‌توانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.

Global

s تمرکز بر منوی جستجو
p منوی پروفایل باز شود
esc بستن پنجره باز
? پنجره میانبرهای صفحه‌کلید باز شود

در صفحات مدیا

b بازگشت به عقب (یا در صورت لزوم به منشا)
e برو به صفحه ویرایش

در صفحات فصل تلویزیونی

(فلش سمت راست) برو به فصل بعد
(پیکان سمت چپ) برو به نشست قبلی

در صفحات قسمت تلویزیونی

(فلش سمت راست) برو به قسمت بعد
(پیکان سمت چپ) برو به قسمت قبلی

در تمام صفحات تصویر

a پنجره افزودن تصویر باز شود

در تمام صفحات ویرایش

t انتخابگر ترجمه باز شود
ctrl+ s ثبت از

در صفحات بحث

n ایجاد بحث جدید
w تغییر وضعیت وضعیت تماشا
p تغییر وضعیت عمومی/خصوصی
c تغییر وضعیت بسته/باز
a گشایش صفحه فعالیت
r پاسخ به بحث
l برو به آخرین پاسخ
ctrl+ enter پیام خود را ثبت کنید
(فلش سمت راست) صفحه بعد
(پیکان سمت چپ) صفحه قبلی

تنظیمات

آیا می‌خواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟

ورود