X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Foptimize-old-videos.ts;h=9595efd9c6623af298b4369d80db272bc2d89176;hb=c8f3cfeba7acc2ab9c5f03161d22856202a49326;hp=107483c509bee43f272b88a43f425efdafefda4d;hpb=d7a25329f9e607894d29ab342b9cb66638b56dc0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/optimize-old-videos.ts b/scripts/optimize-old-videos.ts index 107483c50..9595efd9c 100644 --- a/scripts/optimize-old-videos.ts +++ b/scripts/optimize-old-videos.ts @@ -1,17 +1,17 @@ import { registerTSPaths } from '../server/helpers/register-ts-paths' +registerTSPaths() + import { VIDEO_TRANSCODING_FPS } from '../server/initializers/constants' import { getDurationFromVideoFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../server/helpers/ffmpeg-utils' import { getMaxBitrate } from '../shared/models/videos' import { VideoModel } from '../server/models/video/video' import { optimizeOriginalVideofile } from '../server/lib/video-transcoding' -import { initDatabaseModels } from '../server/initializers' +import { initDatabaseModels } from '../server/initializers/database' import { basename, dirname } from 'path' import { copy, move, remove } from 'fs-extra' import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' import { getVideoFilePath } from '@server/lib/video-paths' -registerTSPaths() - run() .then(() => process.exit(0)) .catch(err => {