Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":"/zEc3FhzsI8GBGsyyBZoXuMMqVYd.jpg","genre_ids":[10751],"id":915598,"original_language":"no","original_title":"Nå skal du høre ...","overview":"Molly visits her grandparents.","popularity":0.913,"poster_path":"/qHpUdEw8rUHwlp4z4zOdbaMBF28.jpg","release_date":"2005-10-29","title":"Molly \u0026 Grandpa","video":false,"vote_average":7.0,"vote_count":1,"character":"Grandpa","credit_id":"61b7b1aec616ac006688e95e","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/oF3FPMstCse6ZSbjpEFdZXaLYvt.jpg","genre_ids":[35],"id":24656,"original_language":"no","original_title":"Da jeg traff Jesus... med sprettert","overview":"Little Oddemann uses every means available to find Jesus, including his slingshot. The film takes us to Norway in the late '30s, where we meet a series of burlesque and humorous characters, whose antics convince Oddemann that growing up may be a bad idea. Yet Oddemann finds there are certain rewards to being grown-up, such as partying and chasing women, that merit closer examination.","popularity":0.952,"poster_path":"/3zIEDQL2M0hXxi2BKPmEtBEhRo2.jpg","release_date":"2000-09-01","title":"Odd Little Man","video":false,"vote_average":5.6,"vote_count":8,"character":"Forteller","credit_id":"64463d54a06efe0f9da4cc32","order":17,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[16],"id":224447,"original_language":"en","original_title":"Huset på Kampen","overview":"A man buys a house on a hill. A rat was there first, and proves to be unusually difficult to remove; it seems to think all the man's attempts to kill it are actually gifts. It loves the taste of the poison, thinks the trap is a sculpture, and so forth.","popularity":0.707,"poster_path":null,"release_date":"1998-01-01","title":"One Day a Man Bought a House","video":false,"vote_average":5.6,"vote_count":10,"character":"Narrator","credit_id":"52fe4e3e9251416c7515009f","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[16,10752],"id":247176,"original_language":"no","original_title":"Gjennom mine tykke briller","overview":"An elderly man tells his granddaughter his personal story of the Second World War. His life as a child and all the strange characters he populates it with takes the little girl to a bizarre world she doesn't understand.","popularity":0.536,"poster_path":null,"release_date":"2004-06-10","title":"Through My Thick Glasses","video":false,"vote_average":7.0,"vote_count":1,"character":"Grandfather (voice)","credit_id":"52fe4f21c3a36847f82bf77f","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[16],"id":345015,"original_language":"no","original_title":"Det opprørske alfabetet","overview":"This is an animated film about a country ruled by a dictator. The little general who has all power in the country, has denied its people to read and write. The one rule after another are being introduced to prevent words from spreading, for general knew understood that art and knowledge are essential for freedom. But there are ways to fool strict generals on. A small book printer will not let himself stop of prohibitions, but keeps confidently on their books and words, and he gets help from both the weather and other great powers.","popularity":0.522,"poster_path":"/5Gf9Y1OPr4rWtHnhHDUdGFh7a6f.jpg","release_date":"1994-06-18","title":"The Rebellious Alphabet","video":false,"vote_average":5.6,"vote_count":5,"character":"Narrator (voice)","credit_id":"558203299251410b540001c4","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99,36,35],"id":365530,"original_language":"en","original_title":"Alt for Norge","overview":"This is a humouristic viewpoint upon Norways history the last 100 years - Since the end of the union with Sweden in 1905. A Guide through Norways history the last 100 years.","popularity":1.249,"poster_path":"/eCnr5fetVdpA2jYgGHfS1nt60ln.jpg","release_date":"2005-01-28","title":"Alt for Norge","video":false,"vote_average":5.0,"vote_count":3,"character":"Narrator","credit_id":"562ef59fc3a3681b5200c3ba","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":"/tbQUgBu3Y0cJVwTfjGV2g8lvx3S.jpg","genre_ids":[10402,35],"id":524583,"original_language":"en","original_title":"Hva er det de vil?","overview":"A cabaret show with Odd Børretzen and Alf Cranner filmed in September 1979 at the ABC-Teateret in Oslo, Norway.","popularity":0.152,"poster_path":"/oovEJTiCorawriPIUAvMYE8nQJP.jpg","release_date":"1981-01-24","title":"What Do They Want?","video":false,"vote_average":0.0,"vote_count":0,"character":"","credit_id":"5afc738c0e0a260d480004fc","order":0,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[99,36],"id":152764,"original_language":"no","original_title":"Krigsseilerne – med æren i behold","overview":"","popularity":0.351,"poster_path":"/xUg6TrF5EvJHLI7UlHppvDRdkF3.jpg","release_date":"2008-01-01","title":"Krigsseilerne – med æren i behold","video":false,"vote_average":10.0,"vote_count":1,"character":"Forteller","credit_id":"5c4cd7b692514151a955bc4b","order":5,"media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":633406,"original_language":"no","original_title":"Makaroni Blues","overview":"When Italian Vincenzo comes to Norway to open a restaurant, Norwegian drinking habits and alcohol politics are seen with southern European eyes. Vincenzo dies trying, and his brother seeks revenge.","popularity":1.978,"poster_path":"/hG8IIBLiw1peU9zYOHOkbGVftqL.jpg","release_date":"1986-09-04","title":"Makaroni Blues","video":false,"vote_average":0.0,"vote_count":0,"character":"Granåsen, lektor","credit_id":"5d884b40223e200010744c58","order":6,"media_type":"movie"}],"crew":[{"adult":false,"backdrop_path":"/oF3FPMstCse6ZSbjpEFdZXaLYvt.jpg","genre_ids":[35],"id":24656,"original_language":"no","original_title":"Da jeg traff Jesus... med sprettert","overview":"Little Oddemann uses every means available to find Jesus, including his slingshot. The film takes us to Norway in the late '30s, where we meet a series of burlesque and humorous characters, whose antics convince Oddemann that growing up may be a bad idea. Yet Oddemann finds there are certain rewards to being grown-up, such as partying and chasing women, that merit closer examination.","popularity":0.952,"poster_path":"/3zIEDQL2M0hXxi2BKPmEtBEhRo2.jpg","release_date":"2000-09-01","title":"Odd Little Man","video":false,"vote_average":5.6,"vote_count":8,"credit_id":"52fe44a2c3a368484e02e34b","department":"Writing","job":"Author","media_type":"movie"},{"adult":false,"backdrop_path":"/4fA8AYVQaISABVSpr7ZEa1nCfL5.jpg","genre_ids":[],"id":111271,"original_language":"nb","original_title":"Papirdragen","overview":"","popularity":0.73,"poster_path":"/1IWjJ9DAlgFTwLZI9sqTgztNam9.jpg","release_date":"1963-01-01","title":"Papirdragen","video":false,"vote_average":6.2,"vote_count":5,"credit_id":"6250ae0ac9982600a023a79b","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":"/tbQUgBu3Y0cJVwTfjGV2g8lvx3S.jpg","genre_ids":[10402,35],"id":524583,"original_language":"en","original_title":"Hva er det de vil?","overview":"A cabaret show with Odd Børretzen and Alf Cranner filmed in September 1979 at the ABC-Teateret in Oslo, Norway.","popularity":0.152,"poster_path":"/oovEJTiCorawriPIUAvMYE8nQJP.jpg","release_date":"1981-01-24","title":"What Do They Want?","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5afc7757c3a3685fe9000a45","department":"Writing","job":"Writer","media_type":"movie"},{"adult":false,"backdrop_path":null,"genre_ids":[18],"id":633406,"original_language":"no","original_title":"Makaroni Blues","overview":"When Italian Vincenzo comes to Norway to open a restaurant, Norwegian drinking habits and alcohol politics are seen with southern European eyes. Vincenzo dies trying, and his brother seeks revenge.","popularity":1.978,"poster_path":"/hG8IIBLiw1peU9zYOHOkbGVftqL.jpg","release_date":"1986-09-04","title":"Makaroni Blues","video":false,"vote_average":0.0,"vote_count":0,"credit_id":"5d884bf1172d7f00174a9419","department":"Writing","job":"Writer","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'] ?? [];