fix: Enforce convert mode

So it can't be used by adding "&audio=on" manually
This commit is contained in:
Pierre Rudloff 2019-04-21 23:16:27 +02:00
parent 70475f83d4
commit 1edd623c7f

View file

@ -331,7 +331,7 @@ class FrontController
$this->video = new Video($url, $this->defaultFormat, $password);
if ($request->getQueryParam('audio')) {
if ($this->config->convert && $request->getQueryParam('audio')) {
return $this->getAudioResponse($request, $response);
} else {
return $this->getVideoResponse($request, $response);
@ -379,7 +379,7 @@ class FrontController
private function getStream(Request $request, Response $response)
{
if (isset($this->video->entries)) {
if ($request->getQueryParam('audio')) {
if ($this->config->convert && $request->getQueryParam('audio')) {
$stream = new ConvertedPlaylistArchiveStream($this->video);
} else {
$stream = new PlaylistArchiveStream($this->video);