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'
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
}
}
prompt.get(schema, function (err, result) {
if (err) return rej(err)
- return res(result.confirm && result.confirm.match(/y/) !== null)
+
+ return res(result.confirm?.match(/y/) !== null)
})
})
}