]> 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 7cd76d7085378e913f66d3cc8dc5794ec3911be3..9c5df20830ca37421a1492e4906b03e77762b1c6 100644 (file)
@@ -6,9 +6,9 @@ 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'
@@ -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) {