From 22b4555cc0270a0d11ab6d3a59adf5d228917fa0 Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 13 Mar 2023 20:35:39 +0200 Subject: [PATCH] subtitle lan code --- app/workers/transcoding.php | 7 +++++-- composer.lock | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/workers/transcoding.php b/app/workers/transcoding.php index cbc64461bd..70163c2879 100644 --- a/app/workers/transcoding.php +++ b/app/workers/transcoding.php @@ -95,6 +95,10 @@ class TranscodingV1 extends Worker $this->file = $this->database->getDocument('bucket_' . $this->bucket->getInternalId(), $this->video->getAttribute('fileId')); $path = basename($this->file->getAttribute('path')); $inPath = $this->inDir . $path; + + /** + * Write original asset to tmp + */ $result = $this->write($this->project, $this->file); console::info('Transferring video from storage to ' . $this->inDir); @@ -172,13 +176,12 @@ class TranscodingV1 extends Worker foreach ($subtitles as $subtitle) { $subtitle->setAttribute('status', self::STATUS_START); $this->database->updateDocument('videos_subtitles', $subtitle->getId(), $subtitle); - $bucket = $this->database->getDocument('buckets', $subtitle->getAttribute('bucketId')); $file = $this->database->getDocument('bucket_' . $bucket->getInternalId(), $subtitle->getAttribute('fileId')); $path = basename($file->getAttribute('path')); $this->write($this->project, $file); - console::info('Transferring subtitle from storage to [' . $this->inDir . ']'); + console::info('Transferring subtitle from storage to ' . $this->inDir); $ext = pathinfo($path, PATHINFO_EXTENSION); $subtitlePath = $this->inDir . $subtitle->getId() . '.vtt'; diff --git a/composer.lock b/composer.lock index 3fea71c0eb..4de22be3b8 100644 --- a/composer.lock +++ b/composer.lock @@ -135,7 +135,7 @@ "source": { "type": "git", "url": "https://github.com/shimonewman/PHP-FFmpeg-video-streaming.git", - "reference": "fc1c0f4c9ce9b2136e4180f0012002c38e032728" + "reference": "aa5c1849cf95209901b7a7ea0f550d104b42fe6c" }, "require": { "php": "^7.2 || ^8.0", @@ -209,7 +209,7 @@ "video-streaming", "video-streaming" ], - "time": "2023-03-08T14:20:59+00:00" + "time": "2023-03-13T08:04:21+00:00" }, { "name": "appwrite/php-clamav",