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":[18],"id":1255661,"original_language":"en","original_title":"The Ambassadors","overview":"Dramatisation of Henry James's novel. Lambert Strether comes to Europe on a difficult and delicate mission. A chance meeting on arrival with the engaging Maria Gostrey provides him with much-needed support.","popularity":2.048,"poster_path":"/zL89WlTGnk8gLNLVwzqvp7wMQ3p.jpg","release_date":"1977-03-13","title":"The Ambassadors","video":false,"vote_average":0.0,"vote_count":0,"character":"Mamie Pocock","credit_id":"65e9d3f06beaea01867a5f42","order":11,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":1269154,"original_language":"en","original_title":"The Best of Enemies","overview":"In Occupied France, a cultured civilised German ofi ccer is billeted out and stirs up conflicting emotions in the household.","popularity":0.379,"poster_path":null,"release_date":"1977-07-19","title":"The Best of Enemies","video":false,"vote_average":0.0,"vote_count":0,"character":"Jeannette","credit_id":"660e0be8e18e3f0163a330a6","order":2,"media_type":"movie"},{"adult":false,"backdrop_path":"/1f4PRFxEvGJ0b9lOxTvTQmMM0E4.jpg","genre_ids":[10749,35],"id":361015,"original_language":"en","original_title":"There Goes The Bride","overview":"A nervous ad executive creates havoc on his daughter's wedding day and becomes obsessed with a dream girl he keeps seeing everywhere but whom he can't catch.","popularity":2.713,"poster_path":"/aEt8hKIzVhvFoSdUWa2zZ2aDrqj.jpg","release_date":"1980-07-07","title":"There Goes The Bride","video":false,"vote_average":0.0,"vote_count":0,"character":"Judy Westerby","credit_id":"56018fcdc3a36856100023f7","order":12,"media_type":"movie"},{"adult":false,"backdrop_path":"/4Lkx3XJvihmFFi2ELVX45VA2IFD.jpg","genre_ids":[36,18],"id":624330,"original_language":"en","original_title":"The Billion Dollar Bubble","overview":"The Billion Dollar Bubble is a 1976 film made for the BBC series Horizon and directed by Brian Gibson about the story of the two billion dollar insurance embezzlement scheme involving Equity Funding Corporation of America. The movie stars James Woods in the role of the actuary.","popularity":1.25,"poster_path":"/4fkmG4BJ3qJmkm4D6nDzQJq64rT.jpg","release_date":"1978-06-08","title":"The Billion Dollar Bubble","video":false,"vote_average":7.0,"vote_count":1,"character":"Linda","credit_id":"5d59eebb0e4fc8001555b6e7","order":8,"media_type":"movie"},{"adult":false,"backdrop_path":"/zkrM6jyX8kjggqdaVt6Xa9fuXZE.jpg","genre_ids":[35,9648,10770],"id":250868,"original_language":"en","original_title":"The Secret Adversary","overview":"After a chance meeting and an indiscreet conversation, childhood friends Tommy Beresford and Tuppence Cowley become involved in a convoluted intrigue led by a mysterious man known simply as Mr. Brown.","popularity":1.343,"poster_path":"/jwWinzok3UrztPfNKKW5zksTS35.jpg","release_date":"1983-10-09","title":"The Secret Adversary","video":false,"vote_average":6.8,"vote_count":8,"character":"Jane Finn","credit_id":"5f067c6213a32000346fa460","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":1359340,"original_language":"en","original_title":"The Sweet Scent of Death","overview":"An overworked American ambassador working in the UK attempts to spend more time with his wife by visiting a countryside mansion, but soon the trip turns into a nightmare with his wife haunted by a stalker seemingly from her past.","popularity":1.039,"poster_path":"/9cCJZQcp4UiRGViNryr9MmS9ECt.jpg","release_date":"1984-12-17","title":"The Sweet Scent of Death","video":false,"vote_average":6.0,"vote_count":1,"character":"Paula","credit_id":"66eddfc37300a5ba213add61","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":"/vcm0OhuGH8M6GFzTP7pqv0BmNV8.jpg","genre_ids":[18],"id":16502,"origin_country":["US"],"original_language":"en","original_name":"Poor Little Rich Girl: The Barbara Hutton Story","overview":"The true story of Barbara Hutton, who had inherited $40 million by the age of 6. This insight explores the effects that money can have on one's life, loves, and careers.","popularity":18.469,"poster_path":"/grQXcu6sZllSkFrsJw1peFgLWfb.jpg","first_air_date":"1989-04-30","name":"Poor Little Rich Girl: The Barbara Hutton Story","vote_average":4.5,"vote_count":4,"character":"Edna Hutton","credit_id":"6058646e5c071b00546cb0df","episode_count":6,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":35934,"origin_country":["GB"],"original_language":"en","original_name":"The Old Men at the Zoo","overview":"An incompetently managed zoo becomes a metaphor for the state of Britain as a nuclear crisis looms over Europe.","popularity":2.675,"poster_path":null,"first_air_date":"1983-09-15","name":"The Old Men at the Zoo","vote_average":5.0,"vote_count":1,"character":"Martha Carter","credit_id":"60b83cf5907f26003f81bcab","episode_count":5,"media_type":"tv"},{"adult":false,"backdrop_path":"/d0HNUBeyVdVT7oS7A6cu3ZAX3v6.jpg","genre_ids":[18],"id":15733,"origin_country":["US"],"original_language":"en","original_name":"The Two Mrs. Grenvilles","overview":"Ann, a former chorus girl marries above herself into a rich society family, but her mother-in-law regards her with great suspicion from the start. When Ann shoots her husband dead, claiming she thought he was a prowler, the older Mrs. Grenville decides to back the woman she despises, to protect the family image.","popularity":4.583,"poster_path":"/8UPZoZacI8X0GEJQtwWZfbZFBb2.jpg","first_air_date":"1987-02-08","name":"The Two Mrs. Grenvilles","vote_average":4.3,"vote_count":3,"character":"Esme Bland","credit_id":"6190e70b957e6d0085be5b43","episode_count":2,"media_type":"tv"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":29756,"origin_country":["GB"],"original_language":"en","original_name":"The Brack Report","overview":"After an earthquake causes some damage to a nuclear power station, one of the chief nuclear physicists, Paul Brack, starts to investigate the safety procedures and policies of the station. He is dismayed to discover that there is a lack of real safety processes at the station, and quits his job in disgust. His disillusionment puts a strain on his relationship with his wife, Pat, a fellow researcher and academic.\n\nThrough a mutual friend, Brack meets and begins to work for energy consultant Harold Harlan, with hopes that Harlan can highlight the issue of nuclear safety, and explore alternative energy sources. Unfortunately Harlan has his own plans for how he can use Brack.","popularity":6.719,"poster_path":null,"first_air_date":"1982-04-06","name":"The Brack Report","vote_average":5.0,"vote_count":1,"character":"Sophie Ferris","credit_id":"61a5f01ab458b80092194a64","episode_count":10,"media_type":"tv"},{"adult":false,"backdrop_path":"/qiiujIKysSrM2TaojDudG9cTpFj.jpg","genre_ids":[35],"id":2765,"origin_country":["GB"],"original_language":"en","original_name":"The Good Life","overview":"Tom and Barbara Good escape the rat race and pursue a self-sufficient lifestyle in Surbiton, much to the concern, frustration and sometimes envy of their neighbours Margo and Jerry Leadbetter. Entitled ‘Good Neighbors’ when shown in the USA.","popularity":10.556,"poster_path":"/ll4SdFLqWCK2Ss2mYSAN6zJCzxZ.jpg","first_air_date":"1975-04-04","name":"The Good Life","vote_average":7.6,"vote_count":36,"character":"Miss Harmsworth","credit_id":"63fc1e0a57176f008544d69d","episode_count":1,"media_type":"tv"},{"adult":false,"backdrop_path":"/xAMURyJf2ohTYvwXL9GsUdTfAiU.jpg","genre_ids":[9648,18],"id":16171,"origin_country":["GB"],"original_language":"en","original_name":"Hammer House of Mystery and Suspense","overview":"Hammer House of Mystery and Suspense was a short-lived anthology television series from Hammer Studios. Though similar in format to the 1980 series Hammer House of Horror, the Mystery and Suspense series had feature-length episodes, usually running around 70 minutes without commercials.\n\nThe series was a co-production by Hammer Studios with 20th Century Fox Television, and is known in the United States as Fox Mystery Theater. Unlike 1980's Hammer House of Horror, all the episodes had American actors as either the leads or in key roles. It was first aired in the UK by ITV in 1984, though was not simulcast and was shown in different timeslots throughout the various ITV regions.","popularity":12.155,"poster_path":"/zUcUSxhOZQjE18wtT0LeuBowy8Z.jpg","first_air_date":"1984-09-05","name":"Hammer House of Mystery and Suspense","vote_average":6.4,"vote_count":7,"character":"Paula","credit_id":"66f856381a9c9188fecc2c33","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'] ?? [];