templating->render('dev/np', [ 'header_offset' => (int)$request->getParam('offset', FILTER_SANITIZE_NUMBER_INT), ]); } #[Route('GET', '/now-listening.json')] public function getJson(): array { $info = json_decode(file_get_contents('https://now.flash.moe/get.php?u=flashwave_')); if(empty($info[0]?->name)) return []; $info = $info[0]; return [ 'name' => $info->name, 'now_playing' => !empty($info->nowplaying), 'url' => $info->url, 'cover' => $info->images?->large ?? '', 'artist' => [ 'name' => $info->artist?->name ?? '', 'url' => explode('/_/', $info->url)[0], ], ]; } }