Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/axAxuaCRFg7ZH74pniX5uuCSVsz.jpg","genre_ids":[35,10751],"id":21279,"original_language":"da","original_title":"Gummi-Tarzan","overview":"Ivan is a very lonely 8 year boy who is bullied almost every day in school. Even his father taunts him because Ivan litteraly is a weakling (That should explain the title Rubber Tarzan). As a result of this Ivan spends a lot of his time on daydreaming until he meets a kind of kindred spirit - the friendly and lonely crane driver Ole.","popularity":2.366,"poster_path":"/gzaUxIpMWUGepZjSumZ3QHylnD7.jpg","release_date":"1981-10-15","title":"Rubber Tarzan","video":false,"vote_average":6.357,"vote_count":21,"character":"","credit_id":"54eced72925141796500257f","order":14,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":"/hAVQLnzNhaSD7I1Pt0Pko0AYIM1.jpg","genre_ids":[18,10749],"id":56889,"original_language":"da","original_title":"Vil du se min smukke navle?","overview":"Coming of age, summer camp and first love...","popularity":2.691,"poster_path":"/hfodvb9E9MFcpKNSy9OxritUZyO.jpg","release_date":"1978-10-09","title":"Wanna See My Beautiful Navel?","video":false,"vote_average":6.682,"vote_count":11,"credit_id":"52fe4919c3a36847f8188f97","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[80,28],"id":100558,"original_language":"da","original_title":"Terror","overview":"The terrorism from a juvenile gang culminate\r when the gang leader kills a gang member who want to leave the gang.","popularity":1.269,"poster_path":"/1hgr9LwwnRB9zyqVJyqjAQ54cgA.jpg","release_date":"1977-03-04","title":"Terror","video":false,"vote_average":6.9,"vote_count":4,"credit_id":"55494c94c3a36841b900081c","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/axAxuaCRFg7ZH74pniX5uuCSVsz.jpg","genre_ids":[35,10751],"id":21279,"original_language":"da","original_title":"Gummi-Tarzan","overview":"Ivan is a very lonely 8 year boy who is bullied almost every day in school. Even his father taunts him because Ivan litteraly is a weakling (That should explain the title Rubber Tarzan). As a result of this Ivan spends a lot of his time on daydreaming until he meets a kind of kindred spirit - the friendly and lonely crane driver Ole.","popularity":2.366,"poster_path":"/gzaUxIpMWUGepZjSumZ3QHylnD7.jpg","release_date":"1981-10-15","title":"Rubber Tarzan","video":false,"vote_average":6.357,"vote_count":21,"credit_id":"55494b5692514104ba00077f","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":218943,"original_language":"da","original_title":"Isfugle","overview":"John and René are in their twenties, close friends but different enough for René to be nicknamed Thunderbird, while John remains just plain John. John feels irresistibly drawn into Thunderbird's orbit, but René isn't all flash. He actually longs to share John's plainness and quiet calm.","popularity":1.415,"poster_path":"/cpeTBkPYrOJi3AyfJyHQkbVtDqG.jpg","release_date":"1983-12-26","title":"Isfugle","video":false,"vote_average":7.5,"vote_count":2,"credit_id":"561b615e9251415a6b00026a","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/72spf7CvxQyGsKymzkFDksJOYni.jpg","genre_ids":[35,10751],"id":41686,"original_language":"da","original_title":"Lille Virgil og Orla Frøsnapper","overview":"Little Virgil lives in a henhouse with his best friend Oscar, a one-legged rooster. Virgil's worst enemy is Orla, the local bully-boy. When a circus comes to town, Virgil hires on as the Human Cannonball's apprentice. The role is a perfect fit, and ugly, evil Orla finally gets his comeuppance.","popularity":0.908,"poster_path":"/wfalYR4UzJ3atZ06H2qiJn8p9hk.jpg","release_date":"1980-03-28","title":"Little Virgil and Freddy Frogface","video":false,"vote_average":8.4,"vote_count":5,"credit_id":"56042a3692514122ca004cd6","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/gP95Ty9YBidTCLycY7E6GjtSihO.jpg","genre_ids":[35],"id":455445,"original_language":"da","original_title":"Undskyld vi er her","overview":"","popularity":1.317,"poster_path":"/kwGsaXrDHtBNXzu1KXTBYTMpJTz.jpg","release_date":"1980-12-26","title":"Undskyld vi er her","video":false,"vote_average":8.3,"vote_count":3,"credit_id":"5907174d92514169d802e201","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/748JBqgX9ugf170wG9U0VQUTBX0.jpg","genre_ids":[18],"id":123968,"original_language":"da","original_title":"Den blå munk","overview":"The waitresses at a Copenhagen bar find themselves listening to and advising various clients who wander in to unburden their current problems. The Blue Monk is so named because its jukebox constantly plays music by jazz musician Thelonius Monk. ...The Blue Monk","popularity":0.568,"poster_path":"/gOb7DQh17AA2BUci0JIMNb8gR1D.jpg","release_date":"1998-09-18","title":"The Blue Monk","video":false,"vote_average":6.6,"vote_count":4,"credit_id":"591f957ec3a3687a8e039833","department":"Production","job":"Producer","media_type":"movie"},{"adult":false,"backdrop_path":"/8azaBiKOrgpl2e4yzpbMhWnN4a8.jpg","genre_ids":[16,10751],"id":243115,"original_language":"da","original_title":"Prop og Berta","overview":"Prop \u0026 Berta is the story of a friendship between a little stout man and a big and proud cow, who are able to talk to each other. Together they confront an ugly and evil witch who is determined to get rid of them because they have moved into a house on the edge of her wood. The witch hates neighbours and through magic and evil planning she turns Prop and Berta's friends, the Teeny burpers, into dangerous hoodlums who begin to terrorize the nearby town. Prop and Berta manage to overcome the witch and turn her into a good person, restoring peace in the little town and breaking the spell which binds their friends.","popularity":1.392,"poster_path":"/osjRrT3Om08WHSa0dDi7sswzrTP.jpg","release_date":"2001-01-26","title":"Prop and Berta","video":false,"vote_average":6.0,"vote_count":6,"credit_id":"591f9610c3a368774e03da22","department":"Production","job":"Producer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":326608,"original_language":"da","original_title":"Blind makker","overview":"The last part of the trilogy about the Vesterbro Root Per, which differs from \"The Flight\" (1973) and \"Per\" (1975) by being more comedy. Per has become socially adapted, he gets married and gets permanent work. In his rise live two originals, Kasper and his blind friend Holger, who are busy revealing housing fraud in the neighborhood.","popularity":0.89,"poster_path":"/zEEIk9YKTcx0weiBkbB9O3n7r62.jpg","release_date":"1976-08-27","title":"Dummy Partner","video":false,"vote_average":7.5,"vote_count":2,"credit_id":"591f95489251414add039da6","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/nQG1zKHx4B7Ii1Oe52uHXXEKzH3.jpg","genre_ids":[10751],"id":21289,"original_language":"da","original_title":"Zafir","overview":"","popularity":1.138,"poster_path":"/jMOu1XEhiIao6s84PY5Qc1KUeT3.jpg","release_date":"2003-01-01","title":"Zafir","video":false,"vote_average":3.2,"vote_count":4,"credit_id":"591f944f9251414ab103978a","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[35],"id":357346,"original_language":"da","original_title":"Ild og jord","overview":"","popularity":1.495,"poster_path":"/gK01I4nMgVf4fHyrIM2wFHvMjAM.jpg","release_date":"1955-02-16","title":"Ild og jord","video":false,"vote_average":5.5,"vote_count":2,"credit_id":"5dc59af89c24fc0015bf02de","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/9t23sDRsJq36j36jOzHN2fhSDA2.jpg","genre_ids":[18],"id":54680,"origin_country":["DK"],"original_language":"da","original_name":"John, Alice, Peter, Susanne og lille Verner","overview":"","popularity":2.645,"poster_path":"/xhUOdp5jcK5L1K7opSNKwTRRSMW.jpg","first_air_date":"1976-01-25","name":"John, Alice, Peter, Susanne og lille Verner","vote_average":0.0,"vote_count":0,"credit_id":"65899716fad8e95d768ea468","department":"Writing","episode_count":4,"job":"Writer","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'] ?? [];