diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-11 10:51:33 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-02-28 10:42:19 +0100 |
commit | c729caf6cc34630877a0e5a1bda1719384cd0c8a (patch) | |
tree | 1d2e13722e518c73d2c9e6f0969615e29d51cf8c /server/initializers/migrations | |
parent | a24bf4dc659cebb65d887862bf21d7a35e9ec791 (diff) | |
download | PeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.tar.gz PeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.tar.zst PeerTube-c729caf6cc34630877a0e5a1bda1719384cd0c8a.zip |
Add basic video editor support
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0075-video-resolutions.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/initializers/migrations/0075-video-resolutions.ts b/server/initializers/migrations/0075-video-resolutions.ts index 6e8e47acb..8cd47496e 100644 --- a/server/initializers/migrations/0075-video-resolutions.ts +++ b/server/initializers/migrations/0075-video-resolutions.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import { readdir, rename } from 'fs-extra' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import * as Sequelize from 'sequelize' | ||
4 | import { getVideoStreamDimensionsInfo } from '../../helpers/ffmpeg/ffprobe-utils' | ||
3 | import { CONFIG } from '../../initializers/config' | 5 | import { CONFIG } from '../../initializers/config' |
4 | import { getVideoFileResolution } from '../../helpers/ffprobe-utils' | ||
5 | import { readdir, rename } from 'fs-extra' | ||
6 | 6 | ||
7 | function up (utils: { | 7 | function up (utils: { |
8 | transaction: Sequelize.Transaction | 8 | transaction: Sequelize.Transaction |
@@ -26,7 +26,7 @@ function up (utils: { | |||
26 | const uuid = matches[1] | 26 | const uuid = matches[1] |
27 | const ext = matches[2] | 27 | const ext = matches[2] |
28 | 28 | ||
29 | const p = getVideoFileResolution(join(videoFileDir, videoFile)) | 29 | const p = getVideoStreamDimensionsInfo(join(videoFileDir, videoFile)) |
30 | .then(async ({ resolution }) => { | 30 | .then(async ({ resolution }) => { |
31 | const oldTorrentName = uuid + '.torrent' | 31 | const oldTorrentName = uuid + '.torrent' |
32 | const newTorrentName = uuid + '-' + resolution + '.torrent' | 32 | const newTorrentName = uuid + '-' + resolution + '.torrent' |