video: catch bad request for json
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
0718a03ee0
commit
081687838a
|
@ -196,6 +196,11 @@ class VideoController extends GenericApiController
|
||||||
throw Exceptions::NotFound('live video data');
|
throw Exceptions::NotFound('live video data');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cannot return JSON if it is not a file
|
||||||
|
if ('json' === $format) {
|
||||||
|
throw Exceptions::BadRequest('Invalid format');
|
||||||
|
}
|
||||||
|
|
||||||
// Transcode video if allowed
|
// Transcode video if allowed
|
||||||
if ($transcode && !$this->config->getSystemValue('memories.vod.disable', true)) {
|
if ($transcode && !$this->config->getSystemValue('memories.vod.disable', true)) {
|
||||||
// If video path not given, write to temp file
|
// If video path not given, write to temp file
|
||||||
|
|
Loading…
Reference in New Issue