Use bestaudio if available
This commit is contained in:
parent
39205ebe45
commit
442e2ec87c
1 changed files with 57 additions and 52 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue