async function run () {
await initDatabaseModels(true)
- JobQueue.Instance.init(true)
+ JobQueue.Instance.init()
let ids: number[] = []
}
for (const id of ids) {
- const videoFull = await VideoModel.loadAndPopulateAccountAndServerAndTags(id)
+ const videoFull = await VideoModel.loadFull(id)
const files = videoFull.VideoFiles || []
const hls = videoFull.getHLSPlaylist()
if (files.some(f => f.storage === VideoStorage.FILE_SYSTEM) || hls?.storage === VideoStorage.FILE_SYSTEM) {
console.log('Processing video %s.', videoFull.name)
- const success = await moveToExternalStorageState(videoFull, false, undefined)
+ const success = await moveToExternalStorageState({ video: videoFull, isNewVideo: false, transaction: undefined })
if (!success) {
console.error(