]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/webtorrent.ts
Allow to specify transcoding and import jobs concurrency
[github/Chocobozzz/PeerTube.git] / server / helpers / webtorrent.ts
index b25e44fcd512bf8cc4aec3191bf8eedff20ceb62..9c5df20830ca37421a1492e4906b03e77762b1c6 100644 (file)
@@ -6,15 +6,15 @@ import { CONFIG } from '../initializers/config'
 import { dirname, join } from 'path'
 import * as createTorrent from 'create-torrent'
 import { promisify2 } from './core-utils'
-import { MVideo } from '@server/typings/models/video/video'
-import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/typings/models/video/video-file'
-import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/typings/models/video/video-streaming-playlist'
+import { MVideo } from '@server/types/models/video/video'
+import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file'
+import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist'
 import { WEBSERVER } from '@server/initializers/constants'
 import * as parseTorrent from 'parse-torrent'
 import * as magnetUtil from 'magnet-uri'
 import { isArray } from '@server/helpers/custom-validators/misc'
-import { extractVideo } from '@server/lib/videos'
 import { getTorrentFileName, getVideoFilePath } from '@server/lib/video-paths'
+import { extractVideo } from '@server/helpers/video'
 
 const createTorrentPromise = promisify2<string, any, any>(createTorrent)
 
@@ -149,7 +149,7 @@ function safeWebtorrentDestroy (
   downloadedFile?: { directoryPath: string, filepath: string },
   torrentName?: string
 ) {
-  return new Promise(res => {
+  return new Promise<void>(res => {
     webtorrent.destroy(err => {
       // Delete torrent file
       if (torrentName) {