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":876022,"original_language":"es","original_title":"Las ruteras","overview":"The fight of a trucker to have his own vehicle.","popularity":0.176,"poster_path":"/7XixVF0i7UmtINTJOhfbw6IEwqK.jpg","release_date":"1968-10-17","title":"Las ruteras","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"6147b1135e1200008dae7399","order":3,"media_type":"movie"},{"adult":false,"backdrop_path":"/wb4C5uCPAl3mpzR4WhWqWixSkBs.jpg","genre_ids":[35,18],"id":203958,"original_language":"es","original_title":"Una sombra ya pronto serás","overview":"This film follows the exploits of a middle aged man as he wanders through Argentina. It is set in the early '80s following the end of Argentina's long military dictatorship and is based on a 1990 novel by Osvaldo Soriano. Only recently returned from European exile, with no family and friends to welcome him home, \"the engineer\" travels the lonely southern Pampas of Argentina on the way to a job. He is periodically joined by other strange wanderers such as Nadia, the gun slinging psychic, Lem, a strange travelling millionaire, Barante, the hobo, and Coluccini, a bankrupt circus owner who involves \"the engineer\" in a rigged card game..","popularity":0.973,"poster_path":"/lxHm7zIMnHTRbtu75sskVnvLgCX.jpg","release_date":"1994-05-05","title":"A Shadow You Soon Will Be","video":false,"vote_average":3.9,"vote_count":7,"character":"","credit_id":"52fe4ceac3a368484e1cca3d","order":5,"media_type":"movie"},{"adult":false,"backdrop_path":"/ixluiaWMjNeTiOovID82RkRq3Q1.jpg","genre_ids":[35],"id":505277,"original_language":"es","original_title":"Quinto año Nacional","overview":"This movie was based on a TV series popular in Argentina at that time dealing with the adventures of high school seniors.","popularity":0.563,"poster_path":"/45rpHKEaYYUNnXDeguCd1F9JDDq.jpg","release_date":"1961-10-26","title":"Last year of Nacional High School","video":false,"vote_average":0.0,"vote_count":0,"character":"Juan Fegrossi","credit_id":"638f6e7919675702b58837a5","order":9,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[10402,35],"id":873478,"original_language":"es","original_title":"Dos quijotes sobre ruedas","overview":"The adventures of two truckers (one Argentine and the other Mexican) carrying different people and a suspicious trunk","popularity":0.905,"poster_path":"/aA5wSEM2f1ubHK2Qqe5AfYlIYmP.jpg","release_date":"1966-06-16","title":"Dos quijotes sobre ruedas","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"63a8c591271ca5007c4e8da3","order":7,"media_type":"movie"},{"adult":false,"backdrop_path":"/j2nNqCIXrarmH85czhBlYGg2cXR.jpg","genre_ids":[9648,18,80],"id":369187,"original_language":"es","original_title":"Delito de corrupción","overview":"","popularity":2.05,"poster_path":"/awc8HL2PKHY5P2SvflggGx8z9dB.jpg","release_date":"1991-10-03","title":"Delito de corrupción","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"564d15879251414dcd008222","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":"/9lemSaPnTt6ZgGfJjUADFSGUqsr.jpg","genre_ids":[10752,18],"id":367161,"original_language":"es","original_title":"Los Chicos De La Guerra","overview":"Based on the lives of four boys, all of different social classes and psychological makeup, this film tries to reflect through them the political history of Argentina during the years leading up to the Malvinas War.","popularity":3.252,"poster_path":"/tuE6y11e7SYBuUKcqgXsibX8ilF.jpg","release_date":"1984-08-02","title":"The Children of the War","video":false,"vote_average":5.6,"vote_count":9,"character":"","credit_id":"563ec0f8c3a3681b5e02b085","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":"/yroH7saHnyQZLaLXIBq3yhFRvul.jpg","genre_ids":[35,10749],"id":44516,"original_language":"es","original_title":"El mismo amor, la misma lluvia","overview":"Jorge is a writer for a left-leaning Buenos Aires magazine that's at odds with the country's military dictatorship. He meets lovely and intelligent actress Laura and begins an on-and-off romance that will continue for the next two decades. Fearful of commitment, Jorge initially moves on from her and his fortunes suffer, but the situation changes when he and Laura renew their acquaintance. Meanwhile, the country undergoes a political transformation.","popularity":5.626,"poster_path":"/qSeUv634CRFlHsmdXcUCQkcxqAt.jpg","release_date":"1999-09-16","title":"Same Love, Same Rain","video":false,"vote_average":6.7,"vote_count":59,"character":"Mastronardi","credit_id":"57843c359251411be60007c9","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":"/8EtYE07RXkRqy4Mb5oz7G12v2h8.jpg","genre_ids":[18],"id":55269,"original_language":"es","original_title":"La Noche de los Lápices","overview":"The Night of the Pencils was a series of kidnappings and forced disappearances, followed by the torture, rape, and murder of a number of young students during the last Argentine dictatorship (known as the National Reorganization Process). The kidnappings took place over the course of several days beginning on September 16, 1976.","popularity":6.347,"poster_path":"/8GjSq46q9YC3Vv2vFH6EBOYdXwT.jpg","release_date":"1986-09-04","title":"Night of the Pencils","video":false,"vote_average":6.9,"vote_count":64,"character":"Falso cura","credit_id":"57f3dfdfc3a3683b7e00006e","order":48,"media_type":"movie"},{"adult":false,"backdrop_path":"/fHmkrofupGzJPd6PjDrwpFwVnMC.jpg","genre_ids":[18,80],"id":436437,"original_language":"es","original_title":"Testigo para un Crimen","overview":"A wealthy man comes to Buenos Aires to avenge the death of his young brother. He starts a relation with a suggestive blonde singer from a nightclub run by a mafia boss. One of the musical numbers is made by Michelle, a well-known American transvestite and is the first appearance of a transvestite in an Argentine film, something daring for the time.","popularity":1.388,"poster_path":"/vVo1fLZF4bm8XXpQacC5EzN9LVi.jpg","release_date":"1963-09-18","title":"Violated Love","video":false,"vote_average":4.3,"vote_count":3,"character":"Raúl Peña","credit_id":"58cb73abc3a36828f300aba6","order":3,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":458120,"original_language":"es","original_title":"Los gatos (Prostitución de alto nivel)","overview":"A group of boys and girls rents their bodies to people from high social strata.","popularity":1.848,"poster_path":"/dqUSwwovfVRE0hrTMJvCwj5JT4o.jpg","release_date":"1985-05-09","title":"High Class Affair","video":false,"vote_average":5.1,"vote_count":5,"character":"","credit_id":"591cd5fec3a3687a4b0110b9","order":7,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":480752,"original_language":"es","original_title":"Donde cae el sol","overview":"A story between a 65 years old man and a woman who is thirty years younger that him. The film, explores the human relationships through fully identifiable human beings, taking also into account the prejudices, the lust of life and all those everyday defeats.","popularity":0.351,"poster_path":"/qFMlB97WBRsde46vlrddcjRGZD8.jpg","release_date":"2003-06-19","title":"Donde cae el sol","video":false,"vote_average":0.0,"vote_count":0,"character":"Enrique","credit_id":"59dec941c3a36861a3095c7b","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/myIZvEaZstWE6qLeMkVpgNtsv3U.jpg","genre_ids":[35],"id":550822,"original_language":"es","original_title":"La herencia del Tío Pepe","overview":"A couple of art representatives, harassed by their debts with a mafia organization, invent an \"uncle's story\" to defraud a group of alleged heirs, posing as the testator's lawyers.","popularity":2.15,"poster_path":"/7dKX89Osm9n3wkZGLnKDeQTSs5l.jpg","release_date":"1998-02-05","title":"La herencia del Tío Pepe","video":false,"vote_average":1.0,"vote_count":1,"character":"","credit_id":"5bad2c4e92514150ff03d1fe","order":5,"media_type":"movie"},{"adult":false,"backdrop_path":"/dL3zTCu1snoZXnSe8OB4dwwWyPB.jpg","genre_ids":[80,18],"id":599041,"original_language":"es","original_title":"Sentimental (réquiem para un amigo)","overview":"","popularity":0.572,"poster_path":"/9GJIkbcRyii1ygwCAVBYC40Lxcp.jpg","release_date":"1981-04-02","title":"Sentimental (réquiem para un amigo)","video":false,"vote_average":0.0,"vote_count":0,"character":"Logato","credit_id":"5cc95a35c3a3682820875887","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":"/q33TBpbpVtEQtINakyxYapAT2Bq.jpg","genre_ids":[99,35,10751],"id":618783,"original_language":"es","original_title":"La fiesta de todos","overview":"Documentary about Argentina's victory in the 1978 FIFA World Cup, held in that country during its last dictatorship.","popularity":1.191,"poster_path":"/4cbkx1XXY7wakZZ2LLe1KFXyCWi.jpg","release_date":"1979-05-24","title":"La fiesta de todos","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"5d3cbc2721621b000fef67c4","order":16,"media_type":"movie"},{"adult":false,"backdrop_path":"/xExhzLAhYt0UnnZmqLgFHOY74GY.jpg","genre_ids":[18,53],"id":632186,"original_language":"es","original_title":"Detrás de la mentira","overview":"An industrialist's son becomes part of the communist party.","popularity":0.964,"poster_path":"/9YPVSWi7DIVpPef3wM3LvhWoFP5.jpg","release_date":"1962-12-12","title":"Detrás de la mentira","video":false,"vote_average":0.0,"vote_count":0,"character":"Atilio Roca","credit_id":"5d82519f09c24c0015b619bc","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/zpXuwN71pL5fK7CwUSRkIzVguh8.jpg","genre_ids":[18],"id":711688,"original_language":"es","original_title":"Las barras bravas","overview":"A widowed mother cannot prevent her child from dying from an overdose.","popularity":0.944,"poster_path":"/k3KbPy2teVOnK8khsntfgEyzZUi.jpg","release_date":"1985-08-15","title":"Las barras bravas","video":false,"vote_average":3.0,"vote_count":2,"character":"Juan Carlos","credit_id":"5ed6677fc4f552001ebf1463","order":4,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[27,35],"id":422692,"original_language":"es","original_title":"Tiempos duros para Drácula","overview":"Vampire comedy.","popularity":1.372,"poster_path":"/iiWUMNNEOAP0oYNBIhCdmlIKMU2.jpg","release_date":"1976-01-01","title":"Hard Times for Dracula","video":false,"vote_average":6.0,"vote_count":2,"character":"Cirujano","credit_id":"5fb3f8ae12c6040040b7ef6f","order":10,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":345379,"original_language":"es","original_title":"El caso María Soledad","overview":"The film is a fictional chronicle of a resonant police case that occurred in the city of Catamarca: the crime of the young María Soledad Morales, which had great public repercussion due to the links with the power of the culprits.","popularity":0.859,"poster_path":"/4QS022ErAGcw4OM8jUObySSxle7.jpg","release_date":"1993-03-25","title":"El caso María Soledad","video":false,"vote_average":7.1,"vote_count":6,"character":"El policia","credit_id":"6717ccb3ee419d70db2d3226","order":11,"media_type":"movie"}],"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'] ?? [];