From 14575a7e40f02753a6e4a7db6eae1c44b76f08e1 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 10 Apr 2023 10:59:51 +0300 Subject: [PATCH] updates --- app/controllers/api/videos.php | 1 + app/workers/videos.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/videos.php b/app/controllers/api/videos.php index b4ffa9df9b..58dbee6c93 100644 --- a/app/controllers/api/videos.php +++ b/app/controllers/api/videos.php @@ -846,6 +846,7 @@ App::get('/v1/videos/:videoId/outputs/:output') $baseUrl = TMP_HOST . 'v1/videos/' . $videoId . '/outputs/' . $output; $subtitles = Authorization::skip(fn() => $dbForProject->find('videos_subtitles', [ Query::equal('videoId', [$video->getId()]), + Query::equal('status', ['ready']), ])); $_renditions = $_subtitles = []; diff --git a/app/workers/videos.php b/app/workers/videos.php index 02427e8b2f..18d3b64de1 100644 --- a/app/workers/videos.php +++ b/app/workers/videos.php @@ -173,7 +173,7 @@ class VideosV1 extends Worker $name = 'preview.jpg'; $media ->filters() - ->resize(new \FFMpeg\Coordinate\Dimension(500, 500)) + ->resize(new \FFMpeg\Coordinate\Dimension($this->video->getAttribute('width'), $this->video->getAttribute('height'))) ->synchronize(); $media ->frame(\FFMpeg\Coordinate\TimeCode::fromSeconds($this->args['second'])) @@ -336,7 +336,7 @@ class VideosV1 extends Worker $subs = []; $subtitles = $this->database->find('videos_subtitles', [ Query::equal('videoId', [$this->video->getId()]), - Query::equal('status', ['']), + Query::equal('status', '') ]); foreach ($subtitles as $subtitle) {