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":1035511,"original_language":"hi","original_title":"अजय वर्धन","overview":"The biographical drama is based on Dr Ajay Aryan becoming a famed dental surgeon in Chandigarh, and follows the lead’s rise from being an impoverished goat herder in Haryana to achieving his goals. Meanwhile, his love story, break-up and reuniting with the love of his life also form an integral part of the tale.","popularity":0.536,"poster_path":"/nhT4brSYesZf1D1vrkIZIsQ36kj.jpg","release_date":"2022-12-16","title":"Ajay Wardhan","video":true,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"6349c6951089ba007d5340df","order":8,"media_type":"movie"},{"adult":false,"backdrop_path":"/jr47QrP0jSHzszN7U1FBQRLMQ7S.jpg","genre_ids":[18,10751],"id":60550,"origin_country":["IN","US"],"original_language":"hi","original_name":"Mahabharat","overview":"Mahabharat is a 2013 drama TV series on Star Plus based on Indian legendary epic of the same name. It has been produced by Swastik Pictures and features actors such as Saurabh Raj Jain as Lord Krishna, Shaheer Sheikh as Arjuna, Pooja Sharma as Draupadi, Aham Sharma as Karna and Arav Chowdhary as Bhishma Pitamah. The producers had creative associations with writer Salim Khan, author Devdutt Pattanaik, designer Bhanu Athaiya, music directors Ajay-Atul and Ismail Darbar, action director Ram Shetty and set designer Omang Kumar. The casting of the show is done by Sahil Ansari, Mahesh Chandra Bhatt, Arun Mitra. It started broadcasting on 16 September 2013.","popularity":55.837,"poster_path":"/eV8G3F2MWmtjprghsxZncxCdS90.jpg","first_air_date":"2013-09-16","name":"Mahabharat","vote_average":8.6,"vote_count":20,"character":"Karna","credit_id":"56a5e036c3a36838960096ac","episode_count":267,"media_type":"tv"}],"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'] ?? [];