X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fwebtorrent.ts;h=9c5df20830ca37421a1492e4906b03e77762b1c6;hb=9129b7694d577322327ee79e9b9aa64deee92765;hp=7cd76d7085378e913f66d3cc8dc5794ec3911be3;hpb=610d0be13b3d01f653ef269271dd667a57c85ef2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index 7cd76d708..9c5df2083 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts @@ -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(res => { webtorrent.destroy(err => { // Delete torrent file if (torrentName) {