Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":null,"genre_ids":[27,18,9648,53],"id":642697,"original_language":"en","original_title":"Woods","overview":"A struggling writer believes a secret from his past has come back to haunt him. Paranoia and guilt take over as he tries to figure out who or what has been plaguing him with increasingly violent attacks.","popularity":0.932,"poster_path":"/a6fTaENCOljnceGyRMtm5wxU4Wy.jpg","release_date":"2015-10-21","title":"Woods","video":false,"vote_average":6.2,"vote_count":5,"character":"Norbert","credit_id":"61798016d388ae00611547ea","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":"/nv5TZpzq3I1EzfbSpJPxJGHkJuB.jpg","genre_ids":[28,80,35],"id":796499,"original_language":"en","original_title":"Army of Thieves","overview":"A mysterious woman recruits bank teller Ludwig Dieter to lead a group of aspiring thieves on a top-secret heist during the early stages of the zombie apocalypse.","popularity":37.451,"poster_path":"/iPTZGFmPs7HsXHYxiuxGolihjOH.jpg","release_date":"2021-10-29","title":"Army of Thieves","video":false,"vote_average":6.841,"vote_count":2022,"character":"Snob","credit_id":"617c2842176a940043bb4034","order":54,"media_type":"movie"},{"adult":false,"backdrop_path":"/3mthoPxC27m2LZ7twu2fEIca9mw.jpg","genre_ids":[35,10749,12],"id":768087,"original_language":"cs","original_title":"Ostrov","overview":"Richard and Alice quarrel on an exotic vacation because Richard wants to get a divorce. They decide to fly home early, but their small plane crashes on a deserted island, forcing Richard and Alice to wait together for rescue.","popularity":6.263,"poster_path":"/hXjufuZbhr9fpTe3ZgovGkhF1Ug.jpg","release_date":"2023-02-02","title":"The Island","video":false,"vote_average":5.3,"vote_count":7,"character":"Jimmy Holiday","credit_id":"64731ca75cd16e0116d963fb","order":2,"media_type":"movie"},{"adult":false,"backdrop_path":"/5ngHbTzsdIIp9vQG7jfUKnMDjho.jpg","genre_ids":[18],"id":21887,"original_language":"en","original_title":"The Great Santini","overview":"As he approaches manhood, Ben Meechum struggles to win the approval of his demanding alpha male father, an aggressively competitive, but frustrated marine pilot.","popularity":4.272,"poster_path":"/YWbASptY42d38T8GLeiQln6s09.jpg","release_date":"1979-10-26","title":"The Great Santini","video":false,"vote_average":6.695,"vote_count":64,"character":"Bus Passenger (uncredited)","credit_id":"621faa9e6b5fc20042e682b6","order":64,"media_type":"movie"},{"adult":false,"backdrop_path":"/oH38nxLfCe8Pgefo6CJq3XoiKj3.jpg","genre_ids":[18,36,10749],"id":376972,"original_language":"cs","original_title":"Lída Baarová","overview":"Salzburg, Germany, 2000. The elderly Czech actress Lída Baarová tells a journalist the tumultuous story of her rise to fame in 1930s Berlin and her passionate relationship with the sinister Joseph Goebbels, Minister of Propaganda of the Third Reich.","popularity":7.19,"poster_path":"/lViWHUj8m4XT7KsUTZiKVtYIedm.jpg","release_date":"2016-01-21","title":"The Devil's Mistress","video":false,"vote_average":6.1,"vote_count":65,"character":"Robert George Ritchie - MGM Agent","credit_id":"6696496aab72cf548c48ec81","order":19,"media_type":"movie"},{"adult":false,"backdrop_path":"/5aN7k1pf1BR3rNDXKKcouSHcNaJ.jpg","genre_ids":[18],"id":498155,"original_language":"en","original_title":"The Glass Room","overview":"Liesel Landauer and her friend Hana are linked by a lifelong relationship and an exceptional house built by the architect Von Abt for Liesel and her husband Viktor in Czechoslovakia in the early 1930s.","popularity":7.379,"poster_path":"/2V6JBr9ktbWfL7AO47AnYMofgrE.jpg","release_date":"2019-03-14","title":"The Glass Room","video":false,"vote_average":5.5,"vote_count":31,"character":"Police Officer","credit_id":"6696493248178e1a007b8b85","order":35,"media_type":"movie"},{"adult":false,"backdrop_path":"/rHnIVXHHMgnEhnfv8FtKkfqLaIF.jpg","genre_ids":[36,35],"id":405765,"original_language":"cs","original_title":"Vlk z královských Vinohrad","overview":"The film tells the life story of its director, Jan Nemec, one of the most known and important filmmakers of Czech New Wave.","popularity":2.14,"poster_path":"/du5WWqpyWC0Ade0nrzxjEH4OVhP.jpg","release_date":"2016-09-15","title":"The Wolf from Royal Vineyard Street","video":false,"vote_average":3.3,"vote_count":3,"character":"Immigration Commissioner","credit_id":"5992c1bec3a368412d00ce63","order":11,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":414922,"original_language":"en","original_title":"Murder of a President","overview":"The life of President James Garfield, including his rise to power and the aftermath of his assassination.","popularity":1.631,"poster_path":"/d1TFCskXvpZTPmZ12SlOqEdjhQn.jpg","release_date":"2016-02-02","title":"Murder of a President","video":false,"vote_average":7.6,"vote_count":5,"character":"Reporter","credit_id":"5b27a939c3a36841e40206be","order":12,"media_type":"movie"},{"adult":false,"backdrop_path":"/dLaU69dwoBIlhEqKvdoYn0cMmJa.jpg","genre_ids":[18,36,12],"id":545836,"original_language":"no","original_title":"Amundsen","overview":"The story of Norwegian explorer Roald Amundsen, the leader of the first expedition to reach the South Pole in 1911, and the first person to reach both the North and South Poles in 1926. Follows his all-consuming drive as a polar explorer and the tragedy he brought on himself and others by sacrificing everything in the icy wastelands to achieve his dream.","popularity":8.365,"poster_path":"/yvz9rsCnqq1F0MauURPzps11Y6S.jpg","release_date":"2019-02-15","title":"Amundsen","video":false,"vote_average":6.1,"vote_count":164,"character":"Lincoln Ellsworth","credit_id":"5c65bd929251412fc400ab70","order":11,"media_type":"movie"},{"adult":false,"backdrop_path":"/f6HK5Uk9LQwPpdcdQA5BIhcNa6f.jpg","genre_ids":[18,878,27],"id":1551,"original_language":"en","original_title":"Flatliners","overview":"Five medical students want to find out if there is life after death. They plan to stop one of their hearts for a few seconds, thus simulating death, and then bring the person back to life.","popularity":20.006,"poster_path":"/AuajdrVpCcT1BYxg5rzxprTKWaX.jpg","release_date":"1990-08-10","title":"Flatliners","video":false,"vote_average":6.491,"vote_count":1527,"character":"Medical Student (uncredited)","credit_id":"5f5ad7befd7aa40038da484e","order":46,"media_type":"movie"},{"adult":false,"backdrop_path":"/pHFNaNHqiaZ2myMAsylIm2y17c7.jpg","genre_ids":[18,10752,53],"id":467952,"original_language":"en","original_title":"The Catcher Was a Spy","overview":"Former major league baseball player Moe Berg lives a double life working for the Office of Strategic Services in World War II Europe.","popularity":10.225,"poster_path":"/3aBv9Oln0aoBrEbkMabHIVat6CY.jpg","release_date":"2018-06-22","title":"The Catcher Was a Spy","video":false,"vote_average":6.2,"vote_count":279,"character":"Radio Show Director","credit_id":"60ef313f87e63e005d5aa08c","order":17,"media_type":"movie"},{"adult":false,"backdrop_path":"/46CHPlDDTRNyMuSMQ64FS4nUrtM.jpg","genre_ids":[10759,80,18],"id":46975,"origin_country":["DE","BE","US","FR"],"original_language":"en","original_name":"Crossing Lines","overview":"Through globalization, many countries have been opened and barriers removed to ensure easy trade, travel and cultural diversity. However, this openness has given opportunities to criminals looking to exploit the system and ultimately threaten our global safety. As Europe has become a \"safe house\" for criminals eluding law enforcers, a special kind of law enforcement team is needed to handle specific ongoing crimes on a global level. \"Crossing Lines\" is the story of one such team, made up of five international cops, headed by Captain Daniel. The team - comprised of individuals who have little in common - must learn to live and work under the most dangerous and potentially deadly conditions. Housed in an unused storage section underneath the ICC, this mismatched team faces bureaucratic, jurisdictional and cultural obstacles while traversing continents in pursuit of justice.","popularity":45.463,"poster_path":"/ow8RQrZJUQfOeR5alsj9OAXoxic.jpg","first_air_date":"2013-08-22","name":"Crossing Lines","vote_average":6.7,"vote_count":105,"character":"Heinrich Kaufman","credit_id":"61e03d538cfcc7001cfd0fd5","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":"/46CHPlDDTRNyMuSMQ64FS4nUrtM.jpg","genre_ids":[10759,80,18],"id":46975,"origin_country":["DE","BE","US","FR"],"original_language":"en","original_name":"Crossing Lines","overview":"Through globalization, many countries have been opened and barriers removed to ensure easy trade, travel and cultural diversity. However, this openness has given opportunities to criminals looking to exploit the system and ultimately threaten our global safety. As Europe has become a \"safe house\" for criminals eluding law enforcers, a special kind of law enforcement team is needed to handle specific ongoing crimes on a global level. \"Crossing Lines\" is the story of one such team, made up of five international cops, headed by Captain Daniel. The team - comprised of individuals who have little in common - must learn to live and work under the most dangerous and potentially deadly conditions. Housed in an unused storage section underneath the ICC, this mismatched team faces bureaucratic, jurisdictional and cultural obstacles while traversing continents in pursuit of justice.","popularity":45.463,"poster_path":"/ow8RQrZJUQfOeR5alsj9OAXoxic.jpg","first_air_date":"2013-08-22","name":"Crossing Lines","vote_average":6.7,"vote_count":105,"character":"Businessman","credit_id":"6285f865f10a1a009db2ca00","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":"/7WpwBrTVLfJRMtdpW5wwcVjUm9O.jpg","genre_ids":[18,10751],"id":77288,"origin_country":["DE"],"original_language":"de","original_name":"Die Dasslers","overview":"The life and struggle of the Dassler brothers. Founders of the brands of Adidas and Puma.","popularity":5.962,"poster_path":"/c6S02VdlDqzjjfCDmq1xsbwbDdz.jpg","first_air_date":"2017-04-14","name":"Rivals Forever - The Sneaker Battle","vote_average":6.3,"vote_count":16,"character":"Captain Rollins","credit_id":"5a8d586c0e0a267c6e006cad","episode_count":2,"media_type":"tv"},{"adult":false,"backdrop_path":"/pPUtOmorFMI2q5OF77r9GDcZTkX.jpg","genre_ids":[10764],"id":30957,"origin_country":["GB","US"],"original_language":"en","original_name":"The Amazing Race","overview":"This reality competition sees teams embark on a trek around the world to amazing destinations where they must compete in a series of challenges, some mental and some physical. Only when the tasks are completed will they learn of their next location. Teams who are the farthest behind will gradually be eliminated as the contest progresses, with the first team to arrive at the final destination winning the race and the $1 million prize.","popularity":157.411,"poster_path":"/x1jq0atcQg6UkaZpco0kFL6QHuM.jpg","first_air_date":"2001-09-05","name":"The Amazing Race","vote_average":6.9,"vote_count":139,"character":"Kafka Supervisor (uncredited)","credit_id":"6613d074d18b240163339583","episode_count":1,"media_type":"tv"}],"crew":[{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":685243,"original_language":"en","original_title":"Secrets of the CIA","overview":"It fought against international terrorism in South America and watched out for our allies abroad...but what else did it do?...What are the true secrets of the C.I.A.?","popularity":1.473,"poster_path":"/tdv7JGYHnP1DXWmJShuDvU2CYAF.jpg","release_date":"1998-01-01","title":"Secrets of the CIA","video":false,"vote_average":6.0,"vote_count":1,"credit_id":"5e76970d357c00001150a2c3","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":685243,"original_language":"en","original_title":"Secrets of the CIA","overview":"It fought against international terrorism in South America and watched out for our allies abroad...but what else did it do?...What are the true secrets of the C.I.A.?","popularity":1.473,"poster_path":"/tdv7JGYHnP1DXWmJShuDvU2CYAF.jpg","release_date":"1998-01-01","title":"Secrets of the CIA","video":false,"vote_average":6.0,"vote_count":1,"credit_id":"5e7697ef2f3b17001750c82b","department":"Sound","job":"Sound Editor","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":685243,"original_language":"en","original_title":"Secrets of the CIA","overview":"It fought against international terrorism in South America and watched out for our allies abroad...but what else did it do?...What are the true secrets of the C.I.A.?","popularity":1.473,"poster_path":"/tdv7JGYHnP1DXWmJShuDvU2CYAF.jpg","release_date":"1998-01-01","title":"Secrets of the CIA","video":false,"vote_average":6.0,"vote_count":1,"credit_id":"5e769793cabfe40013225426","department":"Sound","job":"Music","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":685243,"original_language":"en","original_title":"Secrets of the CIA","overview":"It fought against international terrorism in South America and watched out for our allies abroad...but what else did it do?...What are the true secrets of the C.I.A.?","popularity":1.473,"poster_path":"/tdv7JGYHnP1DXWmJShuDvU2CYAF.jpg","release_date":"1998-01-01","title":"Secrets of the CIA","video":false,"vote_average":6.0,"vote_count":1,"credit_id":"5e769778cabfe400152070d1","department":"Production","job":"Producer","media_type":"movie"}]}}
96 'Content-Type' => 'application/json;charset=utf-8',
97 'Authorization' => sprintf('Bearer %s', Configurator::$instance->get('tmdb'))
98 ];
99
100 // Append language preference to headers to avoid adult content
101 $headers['Accept-Language'] = 'en-US'; // Example: Set language preference to English
102
103 // Make the GET request with headers
104 $resp = EasyCurl::setHeaders($headers)->get(...$args);
105
106 // Check if response status is not 200 OK
107 if ($resp->getStatus() != 200) {
108 throw new TmdbClientException('Tmdb Client Error: ' . $resp->getBody(), $resp->getStatus());
109 }
110
111 // Check for adult content in response (assuming TMDB API supports such filtering)
112 $jsonResponse = json_decode($resp->getBody(), true);
113
114
115 return $resp;
116 }
117
118
119 public function getGenre(): array
120 {
121 return $this->request('genre/' . $this->getType() . '/list')['genres'] ?? [];