The Movie Database Support

Until yesterday I was using the API language as pt-BR with no problems. Suddenly, today, it became pt-PT. Here, you can see there's a discrepancy between poster and movie name (the poster is still in pt-BR): https://ibb.co/ypw84Gb Here you can see there's even movies in hindi when using pt-BR: https://ibb.co/SPX5c1f

6 svar (på sida 1 av 1)

Jump to last post

For images, there are no separation between pt-PT and pt-BR. All Portuguese images are in the same category.

Ok, but what about the movie names? Until yesterday they were pt-br for me (which is what i want), and today they were pt-pt. There's even hindi names. Something must have broken.

To get help, you need to give us the exact query you are using to get them.

import { useState, useEffect } from "react"

const App = () => {

  const [topMovies, setTopMovies] = useState([]);

  const getTopRatedMovies = async (url) => {
    const res = await fetch(url);
    const data = await res.json();

    setTopMovies(data.results);
  }

  useEffect(() => {
    const topRatedUrl = `https://api.themoviedb.org/3/movie/top_rated?${apiKey}&language=pt-BR`;

    getTopRatedMovies(topRatedUrl);
  }, []);

  return (
    <div className="App">
      <div>
        {console.log(topMovies)}
      </div>
    </div>
  );
}

export default App

The app that I'm building is written using React. This is a simplified version of App.jsx, it's made just to expose inside of the console the data that I'm fetching from the API. Where there's ${apiKey} in the code, you can replace for api_key=YOURAPIKEY

Here is a screenshot of the console, showing that the name for the movie The Godfather is in pt-PT, even though I'm using pt-BR: https://ibb.co/Mk4tFNQ

Here's what I get when I run the queries:

https://api.themoviedb.org/3/movie/top_rated?language=pt-BR

"id": 238, "original_language": "en", "original_title": "The Godfather", "overview": "Em 1945, Don Corleone é o chefe de uma mafiosa família italiana de Nova York. Ele costuma apadrinhar várias pessoas, realizando importantes favores para elas, em troca de favores futuros. Com a chegada das drogas, as famílias começam uma disputa pelo promissor mercado. Quando Corleone se recusa a facilitar a entrada dos narcóticos na cidade, não oferecendo ajuda política e policial, sua família começa a sofrer atentados para que mudem de posição. É nessa complicada época que Michael, um herói de guerra nunca envolvido nos negócios da família, vê a necessidade de proteger o seu pai e tudo o que ele construiu ao longo dos anos.", "popularity": 152.285, "poster_path": "/oJagOzBu9Rdd9BrciseCm3U3MCU.jpg", "release_date": "1972-03-14", "title": "O Poderoso Chefão"

https://api.themoviedb.org/3/movie/top_rated?language=pt-PT

"id": 238, "original_language": "en", "original_title": "The Godfather", "overview": "Baseado no best-seller de Mário Puzo, o filme acompanha o percurso de Don Vito Corleone, o patriarca de uma das mais notáveis e importantes famílias da máfia italiana de Nova Iorque.", "popularity": 152.285, "poster_path": "/oJagOzBu9Rdd9BrciseCm3U3MCU.jpg", "release_date": "1972-03-14", "title": "O Padrinho"

Seems to be working now for me.

@robbie3999 said:

Here's what I get when I run the queries:

https://api.themoviedb.org/3/movie/top_rated?language=pt-BR

"id": 238, "original_language": "en", "original_title": "The Godfather", "overview": "Em 1945, Don Corleone é o chefe de uma mafiosa família italiana de Nova York. Ele costuma apadrinhar várias pessoas, realizando importantes favores para elas, em troca de favores futuros. Com a chegada das drogas, as famílias começam uma disputa pelo promissor mercado. Quando Corleone se recusa a facilitar a entrada dos narcóticos na cidade, não oferecendo ajuda política e policial, sua família começa a sofrer atentados para que mudem de posição. É nessa complicada época que Michael, um herói de guerra nunca envolvido nos negócios da família, vê a necessidade de proteger o seu pai e tudo o que ele construiu ao longo dos anos.", "popularity": 152.285, "poster_path": "/oJagOzBu9Rdd9BrciseCm3U3MCU.jpg", "release_date": "1972-03-14", "title": "O Poderoso Chefão"

https://api.themoviedb.org/3/movie/top_rated?language=pt-PT

"id": 238, "original_language": "en", "original_title": "The Godfather", "overview": "Baseado no best-seller de Mário Puzo, o filme acompanha o percurso de Don Vito Corleone, o patriarca de uma das mais notáveis e importantes famílias da máfia italiana de Nova Iorque.", "popularity": 152.285, "poster_path": "/oJagOzBu9Rdd9BrciseCm3U3MCU.jpg", "release_date": "1972-03-14", "title": "O Padrinho"

Seems to be working now for me.

I can confirm it's back to normal. Strange.

Kan du inte hitta en film eller tv-serie? Logga in för att skapa den.

Globala

s fokus på sökrutan
p öppna profilmenyn
esc stäng ett öppet fönster
? öppna tangentbordsgenväg fönstret

På mediasidor

b gå tillbaka (eller till förälder när det är tillämpligt)
e gå till redigerings sidan

På tv-säsongssidor

(höger pil) gå till nästa säsong
(vänster pil) gå till den föregående säsongen

På tv-avsnittssidor

(höger pil) gå till nästa avsnitt
(vänster pil) gå till föregående avsnitt

På alla bildsidor

a öppna lägg till bild fönstret

På alla redigeringssidor

t öppna översättnings väljaren
ctrl+ s skicka förmulär

På diskussionssidor

n skapa ny diskussion
w växla sedd-status
p växla offentligt/privat
c växla stäng/öppna
a öppna aktivitet
r svara på diskussionen
l gå till det senaste svaret
ctrl+ enter skicka ditt meddelande
(höger pil) nästa sida
(vänster pil) föregående sida

Inställningar

Vill du betygsätta denna artikel eller lägga till den i en lista?

Logga in