Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/7tkXQNmOPFkhm0rLcniFNVIsY4m.jpg","genre_ids":[18,10752],"id":291556,"original_language":"en","original_title":"Under Jakob's Ladder","overview":"Based on a true story, 'Under Jakob's Ladder' is a full-length feature film that takes place in the Soviet Union during 1938. Jakob, a former teacher who lost his job due to the new Communist system, can only stand by and watch as the world around him slowly disintegrates and fear and suspicion rule the day. Like most of the men in his village, he soon finds himself in a Soviet prison. But it is there that he discovers that the freedom he craves might actually be found within the walls of his cell.","popularity":2.135,"poster_path":"/5BdpO4384zpy5R5Xw3PAZXNwaNm.jpg","release_date":"2011-07-25","title":"Under Jakob's Ladder","video":false,"vote_average":7.0,"vote_count":1,"character":"Oigen","credit_id":"6400a1397a4ee700b917d432","order":9,"media_type":"movie"},{"adult":false,"backdrop_path":"/nju7fWRMhA4oDb3zKKgGCErjLeA.jpg","genre_ids":[16,10751,10402,10770],"id":50933,"original_language":"en","original_title":"The Leprechauns' Christmas Gold","overview":"Sent in search of a Christmas tree, cabin boy Dinty Doyle lands on a mysterious, uncharted Irish island where he accidentally releases a bad-tempered banshee from her pine tree prison. Leprechaun Blarney Kilakilarney knows that in order to survive, the banshee will try to swipe his clan's pot of Christmas gold. With some magical assistance from Lord Patrick, the king of the wee folk, Dinty and Blarney make a plan to outwit the gold-hungry hag before Christmas morning dawns.","popularity":2.053,"poster_path":"/sqPakE91yGAKSwL4Fzrq5x4RLQl.jpg","release_date":"1981-12-23","title":"The Leprechauns' Christmas Gold","video":false,"vote_average":5.8,"vote_count":10,"character":"Dinty Doyle / Father Leprechaun (voice)","credit_id":"61b3b56d894ed6001ce0541e","order":3,"media_type":"movie"},{"adult":false,"backdrop_path":"/fwxOQkzYtRVKs3kzcyukdbsyIuh.jpg","genre_ids":[14,16,10751,12],"id":10150,"original_language":"en","original_title":"The Last Unicorn","overview":"From a riddle-speaking butterfly, a unicorn learns that she is supposedly the last of her kind, all the others having been herded away by the Red Bull. The unicorn sets out to discover the truth behind the butterfly's words. She is eventually joined on her quest by Schmendrick, a second-rate magician, and Molly Grue, a now middle-aged woman who dreamed all her life of seeing a unicorn. Their journey leads them far from home, all the way to the castle of King Haggard.","popularity":18.552,"poster_path":"/2MhDPbadE2ha83qiFwUHPgmKLnV.jpg","release_date":"1982-11-19","title":"The Last Unicorn","video":false,"vote_average":7.1,"vote_count":490,"character":"Hunter #2 / Cully's Men","credit_id":"61b3b4967d5f4b001cb1779c","order":15,"media_type":"movie"},{"adult":false,"backdrop_path":"/pdHRTRNOpEZyJOnDAc0bicSaptU.jpg","genre_ids":[10402,35],"id":624297,"original_language":"en","original_title":"Urinetown","overview":"In the not-so-distant future, a terrible water shortage and 20-year drought has led to a government ban on private toilets and a proliferation of paid public toilets, owned and operated by a single megalomaniac company: the Urine Good Company. If the poor don’t obey the strict laws prohibiting free urination, they’ll be sent to the dreaded and mysterious “Urinetown.” After too long under the heel of the malevolent Caldwell B. Cladwell, the poor stage a revolt, led by a brave young hero, fighting tooth and nail for the freedom to pee “wherever you like, whenever you like, for as long as you like, and with whomever you like.”","popularity":0.974,"poster_path":"/r2vP3zkFl3ZKsAaLKrrftlJKabQ.jpg","release_date":"2001-09-20","title":"Urinetown","video":false,"vote_average":7.7,"vote_count":3,"character":"Old Man Strong / Hot Blade Harry","credit_id":"66916c68aa53b7c827c43a9d","order":7,"media_type":"movie"},{"adult":false,"backdrop_path":"/1tLQaNLr8jvz3SOoRU8ecKf3DTs.jpg","genre_ids":[10402,18,53,27,10770],"id":24745,"original_language":"en","original_title":"Sweeney Todd: The Demon Barber of Fleet Street","overview":"In 1846, Anthony Hope sails into London with the mysterious Sweeney Todd, a once-naive barber whose life and marriage was uprooted by a corrupt justice system. Todd confides in Nellie Lovett, the owner of a local meat pie shop, and the two become partners, as Todd swears revenge on those that have wronged him and decides to take up his old profession.","popularity":4.132,"poster_path":"/7NonLJ8l1DkfSmipAr84OB3zK5F.jpg","release_date":"1982-09-12","title":"Sweeney Todd: The Demon Barber of Fleet Street","video":false,"vote_average":8.0,"vote_count":33,"character":"Tobias Ragg","credit_id":"5e352f0bac8e6b0011c35120","order":7,"media_type":"movie"},{"adult":false,"backdrop_path":"/uUnU4mJwQV6iSZJwVjkYeZKzcNN.jpg","genre_ids":[35],"id":33664,"original_language":"en","original_title":"Asylum Seekers","overview":"Six people on the verge of a breakdown decide to check themselves into an insane asylum, only to discover there is just room for one.","popularity":1.8,"poster_path":"/yKWh7ysbRnU6SmnFQrZbymumfcY.jpg","release_date":"2009-06-13","title":"Asylum Seekers","video":false,"vote_average":3.8,"vote_count":8,"character":"Minnie","credit_id":"6010bac446f3540040b457c2","order":14,"media_type":"movie"},{"adult":false,"backdrop_path":"/vZePKXaSO3537aJTxifE3Rrwobb.jpg","genre_ids":[80,18,9648],"id":1431,"origin_country":["US"],"original_language":"en","original_name":"CSI: Crime Scene Investigation","overview":"A Las Vegas team of forensic investigators are trained to solve criminal cases by scouring the crime scene, collecting irrefutable evidence and finding the missing pieces that solve the mystery.","popularity":577.38,"poster_path":"/i5hmoRjHNWady4AtAGICTUXknKH.jpg","first_air_date":"2000-10-06","name":"CSI: Crime Scene Investigation","vote_average":7.6,"vote_count":1234,"character":"Dog Handler","credit_id":"60159fbf873f00003ba5b32d","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":"/4uWvmON2pqDJtpPAsHMggdDFFrn.jpg","genre_ids":[80,18],"id":549,"origin_country":["US"],"original_language":"en","original_name":"Law \u0026 Order","overview":"In cases ripped from the headlines, police investigate serious and often deadly crimes, weighing the evidence and questioning the suspects until someone is taken into custody. The district attorney's office then builds a case to convict the perpetrator by proving the person guilty beyond a reasonable doubt. Working together, these expert teams navigate all sides of the complex criminal justice system to make New York a safer place.","popularity":472.218,"poster_path":"/6vFL8S6Cci8s7SHWXz60xOisGBC.jpg","first_air_date":"1990-09-13","name":"Law \u0026 Order","vote_average":7.4,"vote_count":578,"character":"Court Clerk","credit_id":"629ef2907d5db5086bed46ed","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[80,18],"id":10457,"origin_country":["US"],"original_language":"en","original_name":"Hack","overview":"Hack is a television series that aired on the American CBS television network from 2002 to 2004. The series centers on the fictional life of a former police officer, Polish-American Mike Olshansky, who left the force after being charged with corruption and now works as a taxi driver in Philadelphia, Pennsylvania.","popularity":38.937,"poster_path":"/zdfIl0Nddmo9G5BWG5L0UoW1WMy.jpg","first_air_date":"2002-09-27","name":"Hack","vote_average":7.9,"vote_count":8,"character":"Little Harry","credit_id":"63aea76c5ad76b00e6f812dd","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[80,18],"id":10457,"origin_country":["US"],"original_language":"en","original_name":"Hack","overview":"Hack is a television series that aired on the American CBS television network from 2002 to 2004. The series centers on the fictional life of a former police officer, Polish-American Mike Olshansky, who left the force after being charged with corruption and now works as a taxi driver in Philadelphia, Pennsylvania.","popularity":38.937,"poster_path":"/zdfIl0Nddmo9G5BWG5L0UoW1WMy.jpg","first_air_date":"2002-09-27","name":"Hack","vote_average":7.9,"vote_count":8,"character":"Harry","credit_id":"63aeaa847ef3811f6c15cd82","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":"/gQYwrYJUf8Vq8biFFqkHCj4QsOk.jpg","genre_ids":[18,80],"id":512,"origin_country":["US"],"original_language":"en","original_name":"Third Watch","overview":"The exploits of a group of men and women who serve the City of New York as police officers, firemen, and paramedics, all working the same fictional 55th precinct during the 3pm to 11pm shift - the 'Third Watch'.","popularity":88.35,"poster_path":"/rWQmgNLdyZGIL6Xuo9ImL0Kh6wt.jpg","first_air_date":"1999-09-23","name":"Third Watch","vote_average":7.9,"vote_count":206,"character":"Bruno","credit_id":"66fb8069e7811ef6cba6699d","episode_count":1,"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'] ?? [];