Handle download lists part 2

This commit is contained in:
Uli Koeth 2017-03-08 13:23:42 +01:00
parent 03cf506132
commit 560e8c6a5f
3 changed files with 26 additions and 21 deletions

View file

@ -209,7 +209,7 @@ class FrontController
private function getVideoResponse(Request $request, Response $response, array $params, $password = null)
{
try {
$video = $this->download->getJSON($params['url'], $this->defaultFormat, $password);
$vidarr = $this->download->getJSON($params['url'], $this->defaultFormat, $password);
} catch (PasswordException $e) {
return $this->password($request, $response);
}
@ -222,10 +222,10 @@ class FrontController
$response,
'video.tpl',
[
'video' => $video,
'vidarr' => $vidarr,
'class' => 'video',
'title' => $video->title,
'description' => 'Download "'.$video->title.'" from '.$video->extractor_key,
'title' => $vidarr[0]->title,
'description' => 'Download "'.$vidarr[0]->title.'" from '.$vidarr[0]->extractor_key,
'protocol' => $protocol,
'config' => $this->config,
'canonical' => $this->getCanonicalUrl($request),