controllers/FrontController.php
private function getInfoResponse(Request $request, Response $response)
    {
        try {
            $this->video->getJson();
        } catch (PasswordException $e) {
            return $this->password($request, $response);
        }

        if (isset($this->video->entries)) {
            $template = 'playlist.tpl';
        } else {
            $template = 'info.tpl';
        }
        $title = _('Video download');
        $description = _('Download video from ').$this->video->extractor_key;
        if (isset($this->video->title)) {
            $title = $this->video->title;
            $description = _('Download').' "'.$this->video->title.'" '._('from').' '.$this->video->extractor_key;
        }
        $this->view->render(
            $response,
            $template,
            [
                'video'         => $this->video,
                'class'         => 'info',
                'title'         => $title,
                'description'   => $description,
                'config'        => $this->config,
                'canonical'     => $this->getCanonicalUrl($request),
                'locale'        => $this->localeManager->getLocale(),
                'defaultFormat' => $this->defaultFormat,
            ]
        );

        return $response;
    }
private function getInfoResponse(Request $request, Response $response)
    {
        try {
            $this->video->getJson();
        } catch (PasswordException $e) {
            return $this->password($request, $response);
        }

        if (isset($this->video->entries)) {
            $template = 'playlist.tpl';
        } else {
            $template = 'info.tpl';
        }
        $title = _('Video download');
        $description = _('Download video from ').$this->video->extractor_key;
        if (isset($this->video->title)) {
            $title = $this->video->title;
            $description = _('Download').' "'.$this->video->title.'" '._('from').' '.$this->video->extractor_key;
        }
        $this->view->render(
            $response,
            $template,
            [
                'video'         => $this->video,
                'class'         => 'info',
                'title'         => $title,
                'description'   => $description,
                'config'        => $this->config,
                'canonical'     => $this->getCanonicalUrl($request),
                'locale'        => $this->localeManager->getLocale(),
                'defaultFormat' => $this->defaultFormat,
            ]
        );

        return $response;
    }
private function getInfoResponse ( Request $ request , Response $ response ) { try { $ this -> video -> getJson ( ) ; } catch ( PasswordException $ e ) { return $ this -> password ( $ request , $ response ) ; } if ( isset ( $ this -> video -> entries ) ) { $ template = 'playlist.tpl' ; } else { $ template = 'info.tpl' ; } $ title = _ ( 'Video download' ) ; $ description = _ ( 'Download video from ' ) . $ this -> video -> extractor_key ; if ( isset ( $ this -> video -> title ) ) { $ title = $ this -> video -> title ; $ description = _ ( 'Download' ) . ' "' . $ this -> video -> title . '" ' . _ ( 'from' ) . ' ' . $ this -> video -> extractor_key ; } $ this -> view -> render ( $ response , $ template , [ 'video' => $ this -> video , 'class' => 'info' , 'title' => $ title , 'description' => $ description , 'config' => $ this -> config , 'canonical' => $ this -> getCanonicalUrl ( $ request ) , 'locale' => $ this -> localeManager -> getLocale ( ) , 'defaultFormat' => $ this -> defaultFormat , ] ) ; return $ response ; }
Return the video description page.

@param Request  $request  PSR-7 request
@param Response $response PSR-7 response

@return Response HTTP response
Return the video description page .