]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/prune-storage.ts
Add bulk comment actions on account dropdown
[github/Chocobozzz/PeerTube.git] / scripts / prune-storage.ts
index c8968013b8dbfd0573c17af4d35d73013aa6bcf9..2b04e906d999ba4d1ffb54148724f33ce1bb6ab5 100755 (executable)
@@ -5,7 +5,7 @@ import * as prompt from 'prompt'
 import { join } from 'path'
 import { CONFIG } from '../server/initializers/config'
 import { VideoModel } from '../server/models/video/video'
-import { initDatabaseModels } from '../server/initializers'
+import { initDatabaseModels } from '../server/initializers/database'
 import { readdir, remove } from 'fs-extra'
 import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy'
 import * as Bluebird from 'bluebird'
@@ -134,9 +134,9 @@ async function doesRedundancyExist (file: string) {
     return true
   }
 
-  const videoFile = video.getFile(resolution)
+  const videoFile = video.getWebTorrentFile(resolution)
   if (!videoFile) {
-    console.error('Cannot find file of video %s - %d', video.url, resolution)
+    console.error('Cannot find webtorrent file of video %s - %d', video.url, resolution)
     return true
   }