Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/zQSNQd8oplx4aF8rW4rVtzXy7aX.jpg","genre_ids":[18],"id":298092,"original_language":"ja","original_title":"北の螢","overview":"Set in the icy wilderness of Hokkaido during the early days of the Meiji era, where the brutal warden of Kabato Prison terrorizes convicts sentenced to forced labor to build the roads needed to open up the territory.","popularity":13.443,"poster_path":"/jaHbkAd9cA4EhIP49adGXypFSBX.jpg","release_date":"1984-09-01","title":"Fireflies in the North","video":false,"vote_average":5.3,"vote_count":6,"character":"","credit_id":"5a47704ec3a3680970009c06","order":10,"media_type":"movie"},{"adult":false,"backdrop_path":"/hvTgJV4fHWhXD2srQ6swDCNSOFa.jpg","genre_ids":[10752,18,36],"id":315559,"original_language":"ja","original_title":"二百三高地","overview":"Depicts the bloody siege of the fortress of Port Arthur, one of the most strongly fortified positions in the world, during the Russo-Japanese War of (1904 - 1905). In the story dominated the character Lt Takeshi Kogyo (Teruhiko Aoi), teachers, and a reserve officer who became commander of the platoon and later company. At the same time monitors the conduct of the army commander general Nogi (Tatsuya Nakadai), which was commissioned of the emperor Matsuhito (Toshirô Mifune) to the conquest of the fort.","popularity":2.668,"poster_path":"/2pOhWSeRT6pAcLk1RyAi079GmTj.jpg","release_date":"1980-08-02","title":"Port Arthur","video":false,"vote_average":7.6,"vote_count":10,"character":"Koreshige Tsunoda","credit_id":"5edd0e4cf36a32002088d571","order":21,"media_type":"movie"},{"adult":false,"backdrop_path":"/u0vMlgk6YOFWzwmSh4zTfbDxlMJ.jpg","genre_ids":[18],"id":207581,"origin_country":["JP"],"original_language":"ja","original_name":"ハイカラさん","overview":"The 29th NHK Asadora. Starring Satomi Tezuka as a woman who starts a hotel in the Meiji era.","popularity":33.252,"poster_path":"/2Op2ojVX6ebGSOz0ZG40HQVj4Ue.jpg","first_air_date":"1982-04-05","name":"Haikara-san","vote_average":0.0,"vote_count":0,"character":"夫・桐原次郎太","credit_id":"62ee47c8be4b3600825c4c05","episode_count":156,"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'] ?? [];