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":[99],"id":1043591,"original_language":"en","original_title":"The Erotic Empire","overview":"A short history of the Japanese 'Pink' movie, focusing on the output of the Nikkatsu studio.","popularity":1.225,"poster_path":"/uTxf1hU8VyjdEw6NdwMPvMtk1ci.jpg","release_date":"","title":"The Erotic Empire","video":false,"vote_average":0.0,"vote_count":0,"character":"self","credit_id":"6362cf4c07e2810082972c4b","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":1049673,"original_language":"fr","original_title":"Cast Clinic","overview":"Cast Clinic is a \"behind the scenes\" footage about the making of Tokyo Blue, the new photography book by Romain Slocombe.","popularity":0.001,"poster_path":"/7Xdu95Yte52i9ukZfPMp6Jx1B7z.jpg","release_date":"","title":"Cast Clinic","video":false,"vote_average":0.0,"vote_count":0,"character":"Himself","credit_id":"63763cf22faf4d00aa035f50","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":737767,"original_language":"fr","original_title":"Un monde flottant","overview":"A controversial documentary made for the 1995's edition of the \"Rencontres d'Arles\", focusing on the japanese photographer Nobuyoshi Araki.","popularity":0.304,"poster_path":"/arvQIxkrEH9jRuj2zl3tCngKaEK.jpg","release_date":"1995-07-10","title":"A Floating World","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"5f4b821112aabc0034a67099","order":23,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":820936,"original_language":"ja","original_title":"Tokyo Love","overview":"Documentary about the porn industry and erotic themes in Japan that describes recurring Japanese fantasies and through meetings with actors in the porn industry provides an insight into Japan's sex culture.","popularity":0.001,"poster_path":"/Rf1NOBEEfdFziIeA7k5jsB2s3b.jpg","release_date":"1996-01-01","title":"Tokyo Love","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"607f3ef4a1d332005774a3c0","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[10770,53,9648,80,18],"id":1035534,"original_language":"fr","original_title":"Suite noire – Envoyez la facture","overview":"","popularity":0.636,"poster_path":"/fDsU534zLmhbA2qduWOuKYXmld.jpg","release_date":"2009-08-23","title":"Suite noire – Envoyez la facture","video":false,"vote_average":2.0,"vote_count":1,"credit_id":"6349dbd7f1759c007af049ca","department":"Writing","job":"Novel","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[27],"id":1067993,"original_language":"ja","original_title":"L'étudiante blessée - 怪我した女子大生","overview":"A college student undergoes unorthodox surgical procedures by hospital nurses.","popularity":0.567,"poster_path":"/t6AWtrlJsGOXORLx3baXeuTtsWt.jpg","release_date":"1995-01-01","title":"Injured College Girl","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"63b00abec56d2d00d8429af9","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":"/7MXBayedYNqrikpsZfVlyZrQXmD.jpg","genre_ids":[16,27,9648],"id":16137,"original_language":"fr","original_title":"Peur(s) du noir","overview":"Several scary black-and-white animated segments in different styles appeal to our fear(s) of the dark.","popularity":2.948,"poster_path":"/9i48eXAo1fviuN6PBhkjl6HT7WS.jpg","release_date":"2007-10-21","title":"Fear(s) of the Dark","video":false,"vote_average":6.4,"vote_count":66,"credit_id":"57df1339c3a3681d4b00192a","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[27],"id":1162006,"original_language":"ja","original_title":"L'étudiante blessée Part 2","overview":"The second film in the trilogy.","popularity":0.001,"poster_path":"/wwTEKSr9zEhTnBgcyku5UQf5FX0.jpg","release_date":"1995-10-12","title":"Injured College Girl: Part 2","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"64d14b1c945d36011c3d350e","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[27],"id":1162007,"original_language":"ja","original_title":"Letudiante Blessee Part 3","overview":"The third film in the trilogy.","popularity":0.001,"poster_path":"/wwTEKSr9zEhTnBgcyku5UQf5FX0.jpg","release_date":"1995-10-28","title":"Injured College Girl: Part 3","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"64d14bc0945d36011c3d3538","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":737767,"original_language":"fr","original_title":"Un monde flottant","overview":"A controversial documentary made for the 1995's edition of the \"Rencontres d'Arles\", focusing on the japanese photographer Nobuyoshi Araki.","popularity":0.304,"poster_path":"/arvQIxkrEH9jRuj2zl3tCngKaEK.jpg","release_date":"1995-07-10","title":"A Floating World","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5f4a95f104b5960037b82595","department":"Directing","job":"Director","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":737767,"original_language":"fr","original_title":"Un monde flottant","overview":"A controversial documentary made for the 1995's edition of the \"Rencontres d'Arles\", focusing on the japanese photographer Nobuyoshi Araki.","popularity":0.304,"poster_path":"/arvQIxkrEH9jRuj2zl3tCngKaEK.jpg","release_date":"1995-07-10","title":"A Floating World","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5f4b80b79ecf1800388f48af","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99],"id":737767,"original_language":"fr","original_title":"Un monde flottant","overview":"A controversial documentary made for the 1995's edition of the \"Rencontres d'Arles\", focusing on the japanese photographer Nobuyoshi Araki.","popularity":0.304,"poster_path":"/arvQIxkrEH9jRuj2zl3tCngKaEK.jpg","release_date":"1995-07-10","title":"A Floating World","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5f4b817674507d0033ae23f7","department":"Crew","job":"Translator","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":761858,"original_language":"fr","original_title":"Week-end à Tokyo","overview":"From Sandai, a teenage girl (Yuka Asai) writes to her friend in France. She met Jean Franasi on a visit to France. We hear her letters as she writes them. However when Jean comes to visit Tokyo for work and we hear his thoughts, it transpires that their feelings towards each other do not match.","popularity":0.329,"poster_path":"/9ijvVsvcbjGzgfqlOjT49sUnz0b.jpg","release_date":"2000-10-18","title":"Week-end à Tokyo","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5fa7cb3cabf8e20040413295","department":"Directing","job":"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'] ?? [];