diff --git a/controllers/FrontController.php b/controllers/FrontController.php index cd9c2c7..8dc2659 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -226,7 +226,7 @@ class FrontController $params = $request->getQueryParams(); if (isset($params["url"])) { try { - $url = $this->download->getURL($params["url"]); + $url = $this->download->getURL($params["url"], $params["format"]); return $response->withRedirect($url); } catch (\Exception $e) { $response->getBody()->write($e->getMessage()); diff --git a/index.php b/index.php index d429588..a934ac8 100644 --- a/index.php +++ b/index.php @@ -45,7 +45,7 @@ $app->get( $app->get( '/redirect', array($controller, 'redirect') -); +)->setName('redirect'); $app->get( '/json', array($controller, 'json') diff --git a/templates/video.tpl b/templates/video.tpl index 16bcb1c..e8291cc 100644 --- a/templates/video.tpl +++ b/templates/video.tpl @@ -23,24 +23,26 @@ {/if}
{if isset($video->formats)} -

Available formats:

-

(You might have to do a Right click > Save as)

-

+

+
+ +

+
+
{else}