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":[35,10749],"id":567601,"original_language":"zh","original_title":"殭屍先生和校花","overview":"After a hundred years of love, Wang Xueqin (Zhang Yaxi), who died in the late Qing Dynasty and the early Republic of China, was resurrected through the psychic jade after a hundred years of inferiority. The innocence of the nervous big Zhang Xiao Orange (Wu Tong ornaments) slowly The melting of Wang Xueqin, an inexplicable sentiment poured into my heart... It turned out to be contrary to the wish. The appearance of Dajinlong cut off two people. In order to save Zhang Xiaoli, Wang Xueqin raised the spirit of jade.","popularity":0.078,"poster_path":"/q5YRps5RK7aGmkdxKiv69FPYb8E.jpg","release_date":"2016-10-19","title":"Zombie Beauty","video":true,"vote_average":0.0,"vote_count":0,"character":"Guard B","credit_id":"5c0de9a1c3a368252d0bc4bc","order":6,"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'] ?? [];