The Movie Database qoldaýy

What is the logic behind selecting the "primary" release date?

When I make a call to api.themoviedb.org/3/movie/1433 (The Devil's Backbone), the api returns release_date: "2007-02-01", even though wikipedia, imdb, and my Criterion Blu-ray all say it was released in 2001. The moviedb page also shows a 2007 release year. I thought this might just be bad data, but then I hit api.themoviedb.org/3/movie/1433/release_dates and got this:

{
  "id": 1433,
  "results": [
    {
      "iso_3166_1": "DE",
      "release_dates": [
        {
          "certification": "16",
          "iso_639_1": "",
          "note": "",
          "release_date": "2002-07-28T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "CA",
      "release_dates": [
        {
          "certification": "",
          "iso_639_1": "",
          "note": "",
          "release_date": "2001-09-09T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "ES",
      "release_dates": [
        {
          "certification": "",
          "iso_639_1": "",
          "note": "",
          "release_date": "2001-04-20T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "GR",
      "release_dates": [
        {
          "certification": "",
          "iso_639_1": "",
          "note": "",
          "release_date": "2001-09-19T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "US",
      "release_dates": [
        {
          "certification": "R",
          "iso_639_1": "",
          "note": "",
          "release_date": "2001-09-02T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "PT",
      "release_dates": [
        {
          "certification": "M/12",
          "iso_639_1": "es",
          "note": "",
          "release_date": "2002-11-22T00:00:00.000Z",
          "type": 3
        }
      ]
    },
    {
      "iso_3166_1": "RU",
      "release_dates": [
        {
          "certification": "",
          "iso_639_1": "ru",
          "release_date": "2007-02-01T00:00:00.000Z",
          "type": 2
        }
      ]
    }
  ]
}

Does the api select type 2 (limited theatrical release) ahead of type 3 (theatrical release) without considering the actual dates? I see the same pattern with Rear Window, which is apparently now a 2016 film thanks to a limited theatrical re-release in Chile. So now Plex tells me that The Devil's Backbone came out in 2007 and Rear Window in 2016.

To fix this problem when I use the api, I make an extra call to movie/:id/release_dates, doubling my api use. I use the following pseudocode to select the earliest theatrical release to use instead of the release date returned from the movie/:id call:

release_date = Infinity
for release in release_dates:
    if release.type in [2, 3] and release.release_date < release_date:
        release_date = release.release_date
return release_date

So how exactly does the api select the "primary" release date, and would it be possible to maybe reconsider that logic?

3 jaýap (1 ishinen 1 betinde)

Jump to last post

Hi tgvarik,

Yes, I have plans on tweaking the logic around this. It should be done this week sometime.

Cheers.

Awesome! Let me know if I can help in any way.

Hi tgvarik,

I'm just running through all of the movies right now and re-saving the primary release date based with some slightly tweaked logic. All of the examples I knew about where this was a little wonky look good.

Fılmdi nemese kórsetimdi taba almadyńyz ba? Ony jasaý úshin kirińiz.

Ǵalamdyq

s kezelimdi izdeý jolaǵyna aýystyrý
p profaıl mázirin ashý
esc ashyq terezeni jabý
? perneler tirkesimi terezesin ashý

Tasyǵyshtar betterinde

b artqa oralý (nemese qoldanylatyn bolsa, tektikke)
e óńdeý betine ótý

Telemaýsym betterinde

(oń jaq kórsetki) kelesi telemaýsymǵa ótý
(sol jaq kórsetki) aldyńǵy telemaýsymǵa ótý

Epizod betterinde

(oń jaq kórsetki) kelesi epızodqa ótý
(sol jaq kórsetki) aldyńǵy epızodqa ótý

Barlyq keskin betterinde

a keskin ústeý terezesin ashý

Barlyq óńdeý betterinde

t tárjime tańdaǵyshyn ashý
ctrl+ s pishindi jiberý

Talqylaý betterinde

n jańa talqylaýdy jasaý
w qaralǵan kúıin aýystyrý
p jalpy/jekeni aýystyrý
c jabý/ashýdy aýystyrý
a áreketterdi ashý
r talqylaýǵa jaýap berý
l sońǵy jaýapqa ótý
ctrl+ enter habaryńyzdy jiberý
(oń jaq kórsetki) kelesi betke
(sol jaq kórsetki) aldyńǵy betke

Parametrler

Want to rate or add this item to a list?

Kirý