Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":null,"genre_ids":[],"id":864000,"original_language":"ru","original_title":"Один день в году","overview":"","popularity":0.643,"poster_path":null,"release_date":"2021-08-21","title":"One Day a Year","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"6213490e1d53860043074754","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":"/jhiEksxs3bicNxu6sJ2oeLn8lce.jpg","genre_ids":[35],"id":517423,"original_language":"ru","original_title":"Счастья! Здоровья!","overview":"Three couples in love — Tatar, Armenian and Russian-are preparing to play weddings. But it turns out that Rinat and Guzelce wedding is a way to get the money to get an expensive violin, for Arthur's father is the most important to the wedding of his son and Muscovite-Julia took place in Armenia, and the Light has a \"skeleton in the closet\" — her ex-boyfriend Andrew wedding day with Oleg was released from prison. But the guests break away from the soul, and the audience of the film \"Best wishes!\" there is a unique opportunity to attend three weddings at once. Toasts and contests, songs and dances, kisses and ... fights – what kind of wedding without a fight?! This bombycosi cool and real funny. Three weddings, three couples-so different, so different. But love unites, and the guests heartily wish: \"Best wishes!»","popularity":1.07,"poster_path":"/yEscQYJuke6N5NVotsFqTM2fyRP.jpg","release_date":"2018-09-13","title":"Best Wishes!","video":false,"vote_average":5.0,"vote_count":5,"character":"","credit_id":"6213460c0bb076001bfd7346","order":37,"media_type":"movie"},{"adult":false,"backdrop_path":"/hOdL0odffg3lEN6mE7rw1HfEq8n.jpg","genre_ids":[18,53],"id":1160916,"original_language":"ru","original_title":"Правда","overview":"Again, a commotion in a small Volga town, a girl disappeared again, they are again looking for a maniac. Zhenya is the only one who knows the truth: the death of the child was an accident. Actually, the girl died almost before his eyes. Only he does not dare to tell this truth to anyone. The fact is that Zhenya was released from prison a couple of days ago, and the sister of the deceased child is Zhenya's ex-girlfriend who left him. The ideal accused. And Zhenya embarks on a difficult, humiliating, dangerous operation to secretly bury a corpse, but if he can go to the end in his deceit, he will lose himself.","popularity":0.621,"poster_path":"/2rhrwhBsWXKbdgsnFfEozSbO0aT.jpg","release_date":"2024-02-01","title":"Truth","video":false,"vote_average":7.0,"vote_count":1,"character":"","credit_id":"64ce33884d679100acf03066","order":5,"media_type":"movie"},{"adult":false,"backdrop_path":"/8FZq5g0iFf1mNeS0pSUjwXBiutH.jpg","genre_ids":[35],"id":587677,"original_language":"ru","original_title":"Хандра","overview":"The three not-so-lucky guys are having the most difficult, weirdest and funniest day of their lives. Meanwhile, in Moscow, a gang of Kyrgyz conspirators begins to wield, a sexist gynecologist and a feminist traumatologist come to work, a film producer is cheating on the Motherland, and clay policemen are uncovering their batons. The only question is which of these meetings will become fatal for our friends.","popularity":1.24,"poster_path":"/n0a7mjwtuvgsex6s0vdMYicbuzr.jpg","release_date":"2019-11-26","title":"Russian Spleen","video":false,"vote_average":6.3,"vote_count":9,"character":"Roma","credit_id":"5c87940fc3a3687f84d4f5ae","order":5,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":"/hOdL0odffg3lEN6mE7rw1HfEq8n.jpg","genre_ids":[18,53],"id":1160916,"original_language":"ru","original_title":"Правда","overview":"Again, a commotion in a small Volga town, a girl disappeared again, they are again looking for a maniac. Zhenya is the only one who knows the truth: the death of the child was an accident. Actually, the girl died almost before his eyes. Only he does not dare to tell this truth to anyone. The fact is that Zhenya was released from prison a couple of days ago, and the sister of the deceased child is Zhenya's ex-girlfriend who left him. The ideal accused. And Zhenya embarks on a difficult, humiliating, dangerous operation to secretly bury a corpse, but if he can go to the end in his deceit, he will lose himself.","popularity":0.621,"poster_path":"/2rhrwhBsWXKbdgsnFfEozSbO0aT.jpg","release_date":"2024-02-01","title":"Truth","video":false,"vote_average":7.0,"vote_count":1,"credit_id":"65e800d82b1b440187695113","department":"Production","job":"Casting 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'] ?? [];