]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/migrations/0075-video-resolutions.ts
Upgrade changelog
[github/Chocobozzz/PeerTube.git] / server / initializers / migrations / 0075-video-resolutions.ts
index e1d9fdacbd27579f2e7a72421ddb859de6ee211a..54ea852b1aadf846f453a4019ace98a953387e55 100644 (file)
@@ -1,10 +1,9 @@
 import * as Sequelize from 'sequelize'
-import * as Promise from 'bluebird'
 import { join } from 'path'
 
 import { readdirPromise, renamePromise } from '../../helpers/core-utils'
 import { CONFIG } from '../../initializers/constants'
-import { getVideoFileHeight } from '../../helpers/ffmpeg-utils'
+import { getVideoFileResolution } from '../../helpers/ffmpeg-utils'
 
 function up (utils: {
   transaction: Sequelize.Transaction,
@@ -28,7 +27,7 @@ function up (utils: {
         const uuid = matches[1]
         const ext = matches[2]
 
-        const p = getVideoFileHeight(join(videoFileDir, videoFile))
+        const p = getVideoFileResolution(join(videoFileDir, videoFile))
           .then(height => {
             const oldTorrentName = uuid + '.torrent'
             const newTorrentName = uuid + '-' + height + '.torrent'