Skip to content

Commit af302f7

Browse files
committed
Update VideoOptimizeJob, save duration
1 parent 191134e commit af302f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/Jobs/Video/VideoOptimizeJob.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ public function handle(): void
103103
->withVisibility('public')
104104
->save($name);
105105

106-
$media->cleanupTemporaryFiles();
107-
106+
$video->duration = $media->getDurationInSeconds();
108107
$video->vid_optimized = $name;
109108
$video->has_processed = true;
110109
$video->status = 2;
111110
$video->save();
112111

112+
$media->cleanupTemporaryFiles();
113+
113114
VideoService::deleteMediaData($video->id);
114115
}
115116
}

0 commit comments

Comments
 (0)