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":324363,"original_language":"en","original_title":"Inside Voices","overview":"For two teen girls, a clandestine night sharing secrets and raiding the liquor cabinet in an uncle’s townhouse is transformed when there’s a power failure.","popularity":0.413,"poster_path":null,"release_date":"2014-09-29","title":"Inside Voices","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"54d71f05c3a3683b8f00522c","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18,12],"id":639225,"original_language":"en","original_title":"I Wish You Would","overview":"On his first day out in the world after being released from a 5250 (the police code for a mental health arrest), Stanley is beset by troubles at every turn in the road as he walks around Oakland looking for something to hold onto.","popularity":1.763,"poster_path":"/sixBg3TblyZHv5pa0GcKNLlDok1.jpg","release_date":"2021-01-05","title":"I Wish You Would","video":false,"vote_average":0.0,"vote_count":0,"character":"Amanda","credit_id":"5e45a2b1db8a0000129b77c1","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":"/hP4PMoQfaofHbLDPIAXrirR7wSF.jpg","genre_ids":[35,10749],"id":9602,"original_language":"en","original_title":"Coming to America","overview":"An African prince decides it’s time for him to find a princess... and his mission leads him and his most loyal friend to Queens, New York. In disguise as an impoverished immigrant, the pampered prince quickly finds himself a new job, new friends, new digs, new enemies and lots of trouble.","popularity":38.928,"poster_path":"/djRAvxyvvN2yqlJKDbT3uy4vOBw.jpg","release_date":"1988-06-29","title":"Coming to America","video":false,"vote_average":6.9,"vote_count":4312,"character":"Rose Bearer #2","credit_id":"5f71059de4b5760039e9dae7","order":17,"media_type":"movie"}],"crew":[]}}
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'] ?? [];