Some videos have no format
This commit is contained in:
parent
edaf6f82c0
commit
113b3d5e50
1 changed files with 30 additions and 27 deletions
|
@ -187,8 +187,10 @@ class FrontController extends BaseController
|
|||
$formats[$genericFormatsLabel][$id] = $this->localeManager->t($genericFormat);
|
||||
}
|
||||
|
||||
$json = $this->video->getJson();
|
||||
if (isset($json->formats)) {
|
||||
/** @var stdClass $format */
|
||||
foreach ($this->video->getJson()->formats as $format) {
|
||||
foreach ($json->formats as $format) {
|
||||
if ($this->config->stream || in_array($format->protocol, ['http', 'https'])) {
|
||||
$formatParts = [
|
||||
// File extension
|
||||
|
@ -218,6 +220,7 @@ class FrontController extends BaseController
|
|||
$formats[$detailedFormatsLabel][$format->format_id] = implode(' ', $formatParts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->render(
|
||||
$response,
|
||||
|
|
Loading…
Reference in a new issue