Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/9UqjNuDYNuk2XxeVbqtZ57DwyXx.jpg","genre_ids":[16,10765,10759],"id":215597,"origin_country":["US"],"original_language":"en","original_name":"The Wingfeather Saga","overview":"Once upon a time, in a cottage above the cliffs on the Dark Sea of Darkness, there lived three children and their trusty dog Nugget. Janner Igiby, his brother Tink, and his sister Leeli are gifted children as all children are. Together they discover the secret of the Jewels of the Shining Isle. They will need their special gifts and all the love of their noble mother and ex-pirate grandfather to survive the venomous Fangs, sea dragons, flabbits, and (gulp) toothy cows!\n\nThe Wingfeather Saga blends the whimsy and heart of THE PRINCESS BRIDE with the vastness and peril of THE LORD OF THE RINGS. After living for years under occupation by the evil Fangs of Dang, the Igiby children find a map rumored to lead to the lost Jewels of Anniera---the one thing the Fangs will do anything to find---and the family is thrown headlong into a perilous adventure, uncovering hidden truths about who they are that will change their world forever.","popularity":8.265,"poster_path":"/wRquZNWAqtp6cPUEM4RS4DZULLs.jpg","first_air_date":"2022-12-02","name":"The Wingfeather Saga","vote_average":7.8,"vote_count":5,"character":"Ferinia Swapleton","credit_id":"638b29d5c3aa3f0096e1ebeb","episode_count":13,"media_type":"tv"}],"crew":[{"adult":false,"backdrop_path":null,"genre_ids":[35],"id":900262,"original_language":"en","original_title":"Never Felt Better","overview":"Inspired by true events, a young man slowly turns into a puppet after being bitten by an evil sock puppet.","popularity":0.858,"poster_path":"/ncanZq73PVHzvwbkPsPS5uIywUh.jpg","release_date":"2021-11-20","title":"Never Felt Better","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"619820de60c7510043fda420","department":"Production","job":"Production Assistant","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'] ?? [];