Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/fD72MhfoxqO5Unfryw8dhAa75sH.jpg","genre_ids":[10751,14],"id":885179,"original_language":"cs","original_title":"O Bumbrlíčkovi","overview":"","popularity":0.616,"poster_path":null,"release_date":"1972-01-01","title":"O Bumbrlíčkovi","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"616943ef53866e0093c8610c","order":8,"media_type":"movie"},{"adult":false,"backdrop_path":"/wssG7sRihWoGJwepbLb5xe1UyKR.jpg","genre_ids":[10751,14],"id":1000466,"original_language":"cs","original_title":"Jak se stal hastrman v Rokytnici ševcem","overview":"","popularity":1.226,"poster_path":null,"release_date":"1970-11-01","title":"Jak se stal hastrman v Rokytnici ševcem","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"62d2b14191745b004cba7119","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":"/yCMLXpyXki5DWGwLzKgHivldLUT.jpg","genre_ids":[35],"id":779613,"original_language":"cs","original_title":"Jak se dělá televizní soutěž","overview":"","popularity":1.729,"poster_path":null,"release_date":"1971-01-01","title":"Jak se dělá televizní soutěž","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"5fe61e1931644b003ef926b0","order":14,"media_type":"movie"},{"adult":false,"backdrop_path":"/lwRFAWtsRMKBGIRDsqF1buk85CS.jpg","genre_ids":[10762],"id":90140,"origin_country":["XC"],"original_language":"cs","original_name":"Strašidýlko Fanfulínek","overview":"","popularity":3.678,"poster_path":null,"first_air_date":"1971-01-01","name":"Strašidýlko Fanfulínek","vote_average":0.0,"vote_count":0,"character":"","credit_id":"6314b5c3326c190079d38728","episode_count":1,"media_type":"tv"}],"crew":[{"adult":false,"backdrop_path":null,"genre_ids":[10402],"id":808628,"original_language":"cs","original_title":"Ljuba 1973","overview":"","popularity":0.406,"poster_path":null,"release_date":"1973-01-01","title":"Ljuba 1973","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"60575efd5c071b003d503c9c","department":"Directing","job":"First Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[10402,35],"id":982222,"original_language":"cs","original_title":"Blázinec ve všech poschodích","overview":"","popularity":0.404,"poster_path":null,"release_date":"1968-07-09","title":"Blázinec ve všech poschodích","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"62962055d48cee0d70716c03","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":"/fyBpevAjTukw4WONBqcCmNi4ZX2.jpg","genre_ids":[35],"id":962630,"original_language":"cs","original_title":"Pension pro svobodné pány","overview":"A young man living in a strictly run boarding house secretly brings a girl of loose morals into his room at night, who is nevertheless well-groomed and takes great advantage of her situation. For the heart of the comedy lies in the problem of how to get rid of a difficult girl in the morning.","popularity":0.526,"poster_path":null,"release_date":"1965-12-26","title":"Pension pro svobodné pány","video":false,"vote_average":6.0,"vote_count":1,"credit_id":"62f386c0594c94007aa614f5","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[35],"id":808946,"original_language":"cs","original_title":"Muzikant","overview":"","popularity":0.521,"poster_path":null,"release_date":"1971-12-24","title":"Muzikant","video":false,"vote_average":7.0,"vote_count":1,"credit_id":"62f386546f31af007d655e25","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":"/h51XeWN9ektZ2GPBd8ZcH1BClkN.jpg","genre_ids":[35],"id":1026261,"original_language":"cs","original_title":"Z nových pověstí českých","overview":"","popularity":1.806,"poster_path":null,"release_date":"1972-01-01","title":"Z nových pověstí českých","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"6328b90b524978007e9f16a8","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[35,10402],"id":1034677,"original_language":"cs","original_title":"Poslyšte příběh, který se vám stal","overview":"","popularity":1.433,"poster_path":null,"release_date":"1973-11-30","title":"Poslyšte příběh, který se vám stal","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"6346d52d71ffdf007a267be6","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":"/9nvo9lx7eZqHFdadxWd4gP20t23.jpg","genre_ids":[35],"id":890974,"original_language":"cs","original_title":"Klasické příznaky","overview":"","popularity":0.346,"poster_path":null,"release_date":"1974-08-02","title":"Klasické příznaky","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"635a43a63c887d007aede7d9","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":"/dXofDLMbbl6KNHrOulIbakBQceV.jpg","genre_ids":[35],"id":1040728,"original_language":"cs","original_title":"Konec agenta č. 312","overview":"","popularity":2.508,"poster_path":null,"release_date":"1974-06-28","title":"Konec agenta č. 312","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"635a501ab1f68d007af2c75a","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[35],"id":1062074,"original_language":"cs","original_title":"Tři muži se žralokem","overview":"","popularity":0.413,"poster_path":null,"release_date":"1975-07-04","title":"Tři muži se žralokem","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"639c6c1518864b00e24d8a96","department":"Directing","job":"Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":"/jePJ6Wqur6nmsilEhzKz6qq91WW.jpg","genre_ids":[35],"id":1155427,"original_language":"cs","original_title":"Cirkus na zelené louce","overview":"","popularity":0.415,"poster_path":null,"release_date":"1978-01-01","title":"Cirkus na zelené louce","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"64bd58f8eb79c200e28dac9c","department":"Directing","job":"First Assistant Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[35],"id":120382,"origin_country":["XC"],"original_language":"cs","original_name":"Bližní na tapetě","overview":"","popularity":6.772,"poster_path":null,"first_air_date":"1970-02-21","name":"Bližní na tapetě","vote_average":0.0,"vote_count":0,"credit_id":"604b7b0cc4ad59002a5021ed","department":"Directing","episode_count":2,"job":"Assistant Director","media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":206421,"origin_country":["XC"],"original_language":"cs","original_name":"Dvacet minut s písničkou","overview":"","popularity":3.569,"poster_path":null,"first_air_date":"1970-05-21","name":"Dvacet minut s písničkou","vote_average":0.0,"vote_count":0,"credit_id":"62da8fbac74eba0072d21f0f","department":"Directing","episode_count":2,"job":"Assistant Director","media_type":"tv"},{"adult":false,"backdrop_path":"/7dIkaFi12c3nmhaDJ7spBH7j7ui.jpg","genre_ids":[],"id":213428,"origin_country":["XC"],"original_language":"cs","original_name":"Prášilové","overview":"","popularity":3.641,"poster_path":null,"first_air_date":"1974-04-26","name":"Prášilové","vote_average":0.0,"vote_count":0,"credit_id":"635d487563d937007aac6e7d","department":"Directing","episode_count":1,"job":"Assistant Director","media_type":"tv"}]}}
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'] ?? [];