Use bestaudio if available

This commit is contained in:
Pierre Rudloff 2016-04-10 19:41:25 +02:00
parent 39205ebe45
commit 442e2ec87c

View file

@ -112,6 +112,10 @@ class FrontController
if (isset($params["url"])) {
if (isset($params['audio'])) {
try {
try {
$url = $this->download->getURL($params["url"], 'bestaudio');
return $response->withRedirect($url);
} catch (\Exception $e) {
$video = $this->download->getJSON($params["url"]);
//Vimeo needs a correct user-agent
@ -167,6 +171,7 @@ class FrontController
);
exit;
}
}
} catch (\Exception $e) {
$error = $e->getMessage();
}