Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/tqaqcu4A1Gka31wKOY62KAb7zeI.jpg","genre_ids":[878,27,9648,53],"id":1307393,"original_language":"en","original_title":"Mind Over Matter","overview":"A Short Film about an Alien Brain Transplant that goes wrong.","popularity":0.561,"poster_path":"/siNfwOdaqum9B0M8zzO6ZYX8HK7.jpg","release_date":"2024-06-21","title":"Mind Over Matter","video":false,"vote_average":0.0,"vote_count":0,"character":"The Grandpa","credit_id":"6675802bacf2d1b910fc8379","order":3,"media_type":"movie"},{"adult":false,"backdrop_path":"/3rlLX7iVifKgtvyDnLcZA6KUjvp.jpg","genre_ids":[37,16,28],"id":1339080,"original_language":"en","original_title":"The Desert Shadow","overview":"Even in the middle of nowhere, you can not hide.","popularity":0.452,"poster_path":"/fgz3Jz7NqQi8qMlCPaN0YMIJT9p.jpg","release_date":"2024-05-13","title":"The Desert Shadow","video":false,"vote_average":10.0,"vote_count":1,"character":"The Wanted Man (Voice)","credit_id":"66cc50e8613112fd5bb34a7c","order":1,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[53],"id":1354523,"original_language":"en","original_title":"SKULKER","overview":"In a world ravaged by apocalypse, a lone survivor fights against the odds to stay alive. However, when he resorts to desperate measures, taking another's life for essentials, he unwittingly becomes the target of a relentless pursuer whose motives remain shrouded in mystery.","popularity":0.194,"poster_path":"/p3Wx8TlNzy4sMCm3YJAJWCvuTUs.jpg","release_date":"2024-06-22","title":"SKULKER","video":false,"vote_average":10.0,"vote_count":1,"character":"The Scavenger","credit_id":"66df33a10bcea093a7789e98","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/f1M200EEIUMN1Anktd1WmzfBuzs.jpg","genre_ids":[35,9648,12],"id":1367622,"original_language":"en","original_title":"Winnie","overview":"October 1998. An ordinary girl begins to receive mysterious letters that lead her to discover a dark family secret.","popularity":0.069,"poster_path":"/8qF8VsE6AiNPNwafSE3CgXhPcQa.jpg","release_date":"2024-12-24","title":"Winnie","video":false,"vote_average":0.0,"vote_count":0,"character":"Lloyd","credit_id":"670818d2200b5388b55655e8","order":5,"media_type":"movie"},{"adult":false,"backdrop_path":"/nsYKDJ2D5tupEVBX5Lu0Q4R5Cxa.jpg","genre_ids":[27,53,9648],"id":1391229,"original_language":"en","original_title":"The Nightwatch","overview":"After starting a new night watch job, Clyde Hercs world spirals into chaos when he realizes the room is pulsing with a dark, malevolent energy. As the horrifying events unfold, he begins to wonder if Phil Paimon, the enigmatic man who hired him, knew far more than he let on.","popularity":2.744,"poster_path":null,"release_date":"2024-11-23","title":"The Nightwatch","video":false,"vote_average":0.0,"vote_count":0,"character":"Clyde Herc","credit_id":"673f735df40282ebcb9b9729","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/4KCphKNEYpyyilhEcuJaUDARuKB.jpg","genre_ids":[80,35],"id":1391670,"original_language":"en","original_title":"Captain Obvious","overview":"Captain Obvious is trying to get a job by explaining how good of a hero he is.","popularity":0.416,"poster_path":"/z2JOcK4jCtAzOVTAKRUhHQUUeNk.jpg","release_date":"2023-09-11","title":"Captain Obvious","video":false,"vote_average":0.0,"vote_count":0,"character":"The Thug","credit_id":"67408ad04b15b8ae31affa3e","order":2,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":null,"genre_ids":[53],"id":1354523,"original_language":"en","original_title":"SKULKER","overview":"In a world ravaged by apocalypse, a lone survivor fights against the odds to stay alive. However, when he resorts to desperate measures, taking another's life for essentials, he unwittingly becomes the target of a relentless pursuer whose motives remain shrouded in mystery.","popularity":0.194,"poster_path":"/p3Wx8TlNzy4sMCm3YJAJWCvuTUs.jpg","release_date":"2024-06-22","title":"SKULKER","video":false,"vote_average":10.0,"vote_count":1,"credit_id":"66df33b9da706543f53adf60","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[53],"id":1354523,"original_language":"en","original_title":"SKULKER","overview":"In a world ravaged by apocalypse, a lone survivor fights against the odds to stay alive. However, when he resorts to desperate measures, taking another's life for essentials, he unwittingly becomes the target of a relentless pursuer whose motives remain shrouded in mystery.","popularity":0.194,"poster_path":"/p3Wx8TlNzy4sMCm3YJAJWCvuTUs.jpg","release_date":"2024-06-22","title":"SKULKER","video":false,"vote_average":10.0,"vote_count":1,"credit_id":"66df33f487f2936e3ec267b8","department":"Editing","job":"Editor","media_type":"movie"},{"adult":false,"backdrop_path":"/nsYKDJ2D5tupEVBX5Lu0Q4R5Cxa.jpg","genre_ids":[27,53,9648],"id":1391229,"original_language":"en","original_title":"The Nightwatch","overview":"After starting a new night watch job, Clyde Hercs world spirals into chaos when he realizes the room is pulsing with a dark, malevolent energy. As the horrifying events unfold, he begins to wonder if Phil Paimon, the enigmatic man who hired him, knew far more than he let on.","popularity":2.744,"poster_path":null,"release_date":"2024-11-23","title":"The Nightwatch","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"673f6e24ce718434f38c04d3","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":"/nsYKDJ2D5tupEVBX5Lu0Q4R5Cxa.jpg","genre_ids":[27,53,9648],"id":1391229,"original_language":"en","original_title":"The Nightwatch","overview":"After starting a new night watch job, Clyde Hercs world spirals into chaos when he realizes the room is pulsing with a dark, malevolent energy. As the horrifying events unfold, he begins to wonder if Phil Paimon, the enigmatic man who hired him, knew far more than he let on.","popularity":2.744,"poster_path":null,"release_date":"2024-11-23","title":"The Nightwatch","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"673f6ecf58ff4e08246365aa","department":"Editing","job":"Editor","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":1391688,"original_language":"en","original_title":"Over The Heath","overview":"TBD - Plot Kept Under Wraps","popularity":0.36,"poster_path":null,"release_date":"","title":"Over The Heath","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"67408fc85cac041cfae2800f","department":"Directing","job":"Director","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'] ?? [];