Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/pIf8upV6QIv4NtJKChjwODoGTQm.jpg","genre_ids":[],"id":1151721,"original_language":"en","original_title":"American Terror Tales 3","overview":"","popularity":0.609,"poster_path":"/8J8FDx7V5uXIHmL3IqT2VWJqPhB.jpg","release_date":"2023-01-01","title":"American Terror Tales 3","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"65fff1c1197de4018619792e","order":1,"media_type":"movie"},{"adult":false,"backdrop_path":"/Rdwfuje1tFB7lGZeZT3rBAftHy.jpg","genre_ids":[10751],"id":229090,"origin_country":["US"],"original_language":"en","original_name":"Home-Schooled","overview":"A self-centered businesswoman living in the city is shocked to discover that she has inherited five sheltered, home-schooled kids in the Midwest.","popularity":1.515,"poster_path":"/i49yyalGwIwl2wPyDfEpH6EdXii.jpg","first_air_date":"2019-08-01","name":"Home-Schooled","vote_average":0.0,"vote_count":0,"character":"Eva Meeks","credit_id":"6491657a2f8d09013afb9e99","episode_count":10,"media_type":"tv"},{"adult":false,"backdrop_path":"/56v2KjBlU4XaOv9rVYEQypROD7P.jpg","genre_ids":[18,10765,9648,10759],"id":66732,"origin_country":["US"],"original_language":"en","original_name":"Stranger Things","overview":"When a young boy vanishes, a small town uncovers a mystery involving secret experiments, terrifying supernatural forces, and one strange little girl.","popularity":407.98,"poster_path":"/uOOtwVbSr4QDjAGIifLDwpb2Pdl.jpg","first_air_date":"2016-07-15","name":"Stranger Things","vote_average":8.6,"vote_count":17702,"character":"Young Girl","credit_id":"629634115a469072f666da8f","episode_count":1,"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'] ?? [];