aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index faa6f3f9b..1cb1e6798 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1325,9 +1325,6 @@ export class VideoModel extends Model<VideoModel> {
1325 videoId: this.id 1325 videoId: this.id
1326 }) 1326 })
1327 1327
1328 const outputPath = this.getVideoFilePath(updatedVideoFile)
1329 await copyFilePromise(inputFilePath, outputPath)
1330
1331 const currentVideoFile = this.VideoFiles.find(videoFile => videoFile.resolution === updatedVideoFile.resolution) 1328 const currentVideoFile = this.VideoFiles.find(videoFile => videoFile.resolution === updatedVideoFile.resolution)
1332 1329
1333 if (currentVideoFile) { 1330 if (currentVideoFile) {
@@ -1344,6 +1341,9 @@ export class VideoModel extends Model<VideoModel> {
1344 updatedVideoFile = currentVideoFile 1341 updatedVideoFile = currentVideoFile
1345 } 1342 }
1346 1343
1344 const outputPath = this.getVideoFilePath(updatedVideoFile)
1345 await copyFilePromise(inputFilePath, outputPath)
1346
1347 await this.createTorrentAndSetInfoHash(updatedVideoFile) 1347 await this.createTorrentAndSetInfoHash(updatedVideoFile)
1348 1348
1349 await updatedVideoFile.save() 1349 await updatedVideoFile.save()