Assistance de TMDB

Hey, When I do a http-request to get a list of mine, it keeps on changing order when I refresh. I would like the ordering to be the same as in my account, just sorted by the date I added the titles. Is this possible, or am I doing something wrong? Thanks in advance.

8 réponses (sur la page 1 sur 1)

Jump to last post

It will be much easier to find the solution to your problem if you put here the API Request you are doing.
Remember to replace your Key with the expression [MY_KEY].

https://api.themoviedb.org/3/list/9402?api_key=[MY_KEY]&language=pt-BR  
https://api.themoviedb.org/4/list/9402?page=1&api_key=[MY_KEY]&language=pt-BR&sort_by=release_date.desc  

I was using following request:

https://api.themoviedb.org/3/list/95533?api_key=[MY_KEY]&sort_by=release-date.desc  

Even if you put the request in a webbrowser, you can see the values change if you refresh the page several times. (Edit: Removed my api key)

I made the conversation Private.
You forgot to replace your Key with the [MY_KEY] expression.
Your API Key should be kept secret. Only for you.

You are using v3 version.
Only v4 allows you to define sorting criteria.
Look here: https://developers.themoviedb.org/3/lists/v4-or-v3-lists

Thanks in advance. But in the V4 version, I still see the json data moving around when I refresh. (trying it just in browser) The json data changes almost every refresh, This is what I'm trying to solve. You can test it using my list (it's a short one, so you'll see.)

Not setting Sort Order the list will come in the order of creation, I think. grin
The possible parameters are:
release_date.asc
release_date.desc
title.asc (Original Title)
title.desc (Original Title)
vote_average.asc
vote_average.desc


Edit: Place your Request v4 here

I tested your list with a v4 Requisition without defining Sort Order.
The result is set to "sort_by": "original_order.desc"
What I received is exactly the same as your list on the TMDb Site.

  "iso_639_1": "nl",
  "id": 95533,
  "page": 1,
  "iso_3166_1": "NL",
  "total_results": 8,
  "object_ids": {
    "movie:9806": "4bc8aa37017a3c122d048fa3",
    "movie:613": "4bc89090017a3c122d00ab75",
    "movie:601": "4bc8905e017a3c122d00a740",
    "movie:12": "4bc88ace017a3c122d00047a",
    "movie:51248": "4d0368d25e73d621a3001a0a",
    "movie:49018": "4cd4af705e73d676d200008f",
    "movie:27965": "4bc8cac5017a3c122d093b8a",
    "movie:135397": "506898c2760ee3434e00042c"
  },
  "revenue": 4225646222,
  "total_pages": 1,
  "name": "Test",
  "public": true,
  "comments": {
    "movie:9806": null,

    "movie:135397": ""
  },
  "sort_by": "original_order.desc",
  "description": "Development test",
  "backdrop_path": null,
  "results": [
    {
      "vote_average": 5,
      "vote_count": 2,
      "id": 27965,
      "video": false,
      "media_type": "movie",
      "title": "Firmin",
      "popularity": 0.662,
      "poster_path": "/tQsIinY3gw5lsaxXaS6pDkRmRAK.jpg",
      "original_language": "en",
      "original_title": "Firmin",
      "genre_ids": [
        28,
        35,
        18
      ],
      "backdrop_path": "/xq9I3xi1IkJIYuA0ZIQiF3Fvf8i.jpg",
      "adult": false,
      "overview": "",
      "release_date": "2007-02-14"
    },
    {
      "vote_average": 7.8,
      "vote_count": 1533,
      "id": 613,
      "video": false,
      "media_type": "movie",
      "title": "A Queda! As Últimas Horas de Hitler",
      "popularity": 8.12,
      "poster_path": "/sTL7R2SbWqPivz8w19iCtY8vFOt.jpg",
      "original_language": "de",
      "original_title": "Der Untergang",
      "genre_ids": [

Nice! It seems like your solution also works in the V3 version! This sorting method is never mentioned in the possibilities, they should. smile

Thanks a lot, man!

Edit: Seems like my previous comment was not correct - The sorting is only consistent in v4 - Using v4 now so the problem is still solved, thanks!

Good catch @TorgasMick, I've updated the docs.

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenêtre ouverte
? Ouvrir la fenêtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenêtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r Répondre à la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion