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":[],"id":128141,"original_language":"en","original_title":"California Heat","overview":"A lifeguard bets he can be true to just one woman.","popularity":0.605,"poster_path":"/c31vApJvyVzFGPwUQV6thacL5Lt.jpg","release_date":"1995-01-01","title":"California Heat","video":false,"vote_average":2.0,"vote_count":1,"character":"Cindy","credit_id":"52fe4b13c3a368484e1764f3","order":1,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[14,12],"id":269741,"original_language":"en","original_title":"The Dragon Gate","overview":"Enter The Dragon Gate and prepare for a pulse pounding journey into the nether regions of the mind and soul. When his girlfriend is kidnapped, a sword wielding warrior, Ken, willingly thrusts himself into an alternate dimension to rescue her. The action is fast and furious as our hero battles legions of blood-thirsty assassins. Seduced by an evil temptress, redeemed by the Sword Goddess of the lake. Ken can escape only if he can answer the riddle of 23 questions!","popularity":3.714,"poster_path":"/2VwW8xkzZST8v8n5kQYPqRvP7bP.jpg","release_date":"1994-12-14","title":"The Dragon Gate","video":false,"vote_average":4.0,"vote_count":1,"character":"The Archer","credit_id":"537303c80e0a267c5c000d17","order":4,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":"/2z00D1K9qB5nVDOy0B2tONIHQ3S.jpg","genre_ids":[99],"id":844584,"original_language":"en","original_title":"Fin","overview":"A group of scientists, researchers and activists sail around the globe to unveil the truth behind the deaths of millions of sharks, exposing the criminal enterprise that is leading to the extinction of these misunderstood creatures.","popularity":1.618,"poster_path":"/ikk7NZr1Nz2831MAxerH5fv7Jay.jpg","release_date":"2021-07-13","title":"Fin","video":false,"vote_average":5.8,"vote_count":4,"credit_id":"60d5022ca76ac50073d99e2b","department":"Production","job":"Producer","media_type":"movie"},{"adult":false,"backdrop_path":"/9f16pRegNsOCQx4qXA6gMFMB3bQ.jpg","genre_ids":[99],"id":517129,"original_language":"en","original_title":"Wolfman's Got Nards","overview":"A documentary that explores the power of cult film told through the lens of the Monster Squad and the impact it has on fans, cast and crew and the industry.","popularity":1.486,"poster_path":"/exSBAnTy68SCz4k9S67zoVA29oM.jpg","release_date":"2018-08-01","title":"Wolfman's Got Nards","video":false,"vote_average":7.7,"vote_count":10,"credit_id":"5acb624bc3a3687dee010bc1","department":"Production","job":"Co-Producer","media_type":"movie"},{"adult":false,"backdrop_path":"/z0aLeu8jJZ3mulOoey5M3JMQ8z2.jpg","genre_ids":[99],"id":576709,"original_language":"en","original_title":"The Boy Band Con: The Lou Pearlman Story","overview":"The life and crimes of boy band impresario Lou Pearlman. The film tracks his life from discovering NSYNC and Backstreet Boys, to his perpetration of one of the largest ponzi schemes in US history.","popularity":2.479,"poster_path":"/22znGIKxx6HTdnHgtPr3u2tAJXN.jpg","release_date":"2019-03-13","title":"The Boy Band Con: The Lou Pearlman Story","video":false,"vote_average":6.3,"vote_count":18,"credit_id":"5c5ffcca0e0a261de16ba11f","department":"Production","job":"Executive Producer","media_type":"movie"},{"adult":false,"backdrop_path":"/snW8FmDHJwAaBEA2DIXeYMvnsGv.jpg","genre_ids":[99],"id":653747,"original_language":"en","original_title":"Giving Voice","overview":"Every year, thousands of high schoolers enter the August Wilson monologue competition for a chance to perform on Broadway. This film follows these students, examining how Wilson and his characters speak to a new generation, inspiring them to listen to his words and find their own voice.","popularity":6.969,"poster_path":"/2qlQceN0IrqXXEIcFCcpm6B3jQb.jpg","release_date":"2020-01-26","title":"Giving Voice","video":false,"vote_average":6.3,"vote_count":21,"credit_id":"5de927223faba000131587db","department":"Production","job":"Executive 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'] ?? [];