Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/k93v6H3Bb2edOiznvOTklInBAzL.jpg","genre_ids":[53,27],"id":128167,"original_language":"ko","original_title":"찍히면 죽는다","overview":"A group of students attempt to make a phoney 'snuff' film after a night of drinking and one of them is killed. The dispose of the body without anyone learning of the incident. A year later finds the same guilt ridden students haunted by a ghastly figure and dying gruesomely one at a time.","popularity":1.453,"poster_path":"/2sD4grmKAgtFLEsjSAGQOKGqg4r.jpg","release_date":"2000-08-26","title":"The Record","video":false,"vote_average":4.1,"vote_count":9,"character":"Teacher","credit_id":"52fe4b14c3a368484e1768a7","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[28],"id":1285398,"original_language":"ko","original_title":"우먼파트너 놀자","overview":"The misadventures of Kim and Jong-suk upon release from prison.","popularity":0.307,"poster_path":"/sZa0ppgoyPsFFe7NyvJu6tPMJ9x.jpg","release_date":"2000-01-01","title":"Woman Partners","video":false,"vote_average":0.0,"vote_count":0,"character":"주수철","credit_id":"6637ae266611b4012d686cd6","order":2,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":128854,"origin_country":["KR"],"original_language":"ko","original_name":"사랑은 이런거야","overview":"It is a drama that gets the sympathy of an unspecified number of people and satisfies their needs.","popularity":47.345,"poster_path":null,"first_air_date":"2001-10-29","name":"사랑은 이런거야","vote_average":0.0,"vote_count":0,"character":"Cha Ki-Bum","credit_id":"64624f6eef8b3200e3ae28ea","episode_count":172,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[35,10767],"id":5707,"origin_country":["KR"],"original_language":"ko","original_name":"X-Man","overview":"Celebrity guests are split into two teams to compete in various contests. One guest, known only to himself, is designated the \"X-Man\", and does his best to cause his team to lose the contests. At the end, all guests try to determine the X-Man's identity.","popularity":69.621,"poster_path":"/lqxp7BHGvTcrwU5WZr4FuDCvNNS.jpg","first_air_date":"2003-11-08","name":"X-Man","vote_average":7.2,"vote_count":5,"character":"Himself","credit_id":"575b4f0192514121400000b1","episode_count":4,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":26975,"origin_country":[],"original_language":"ko","original_name":"She's the One","overview":"나는 그녀가 좋다는 KBS에서 2000년 1월 3일부터 2000년 2월21일까지 방영되었던 월화 미니시리즈이다.\n\n2000년 당시 시청률은 허준이 40%에 육박한 것에 비해 턱없이 매우 낮은 수치에 해당하는 시청률로 집계되었으며, 1~2%대 애국가 시청률로 고전을 면치 못했다.","popularity":1.268,"poster_path":null,"first_air_date":"2000-01-03","name":"She's the One","vote_average":0.0,"vote_count":0,"character":"","credit_id":"5b8788be0e0a266f26009588","episode_count":16,"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'] ?? [];