diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-17 17:50:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-17 17:50:51 +0200 |
commit | dae4a1c0f8d8af2528d7e04fef2b8b65b2d52122 (patch) | |
tree | 4f1fe4e74f140021103d1f9061bf539e50ab8c41 /server/helpers | |
parent | a8ecc6f6709bdb54c47c7dd7cd18ef371254c3af (diff) | |
download | PeerTube-dae4a1c0f8d8af2528d7e04fef2b8b65b2d52122.tar.gz PeerTube-dae4a1c0f8d8af2528d7e04fef2b8b65b2d52122.tar.zst PeerTube-dae4a1c0f8d8af2528d7e04fef2b8b65b2d52122.zip |
Improve webtorrent import error message when the torrent has multiple
files
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/webtorrent.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index 2fdfd1876..f4b44bc4f 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts | |||
@@ -24,7 +24,7 @@ function downloadWebTorrentVideo (target: { magnetUri: string, torrentName?: str | |||
24 | if (timer) clearTimeout(timer) | 24 | if (timer) clearTimeout(timer) |
25 | 25 | ||
26 | return safeWebtorrentDestroy(webtorrent, torrentId, file.name, target.torrentName) | 26 | return safeWebtorrentDestroy(webtorrent, torrentId, file.name, target.torrentName) |
27 | .then(() => rej(new Error('The number of files is not equal to 1 for ' + torrentId))) | 27 | .then(() => rej(new Error('Cannot import torrent ' + torrentId + ': there are multiple files in it'))) |
28 | } | 28 | } |
29 | 29 | ||
30 | file = torrent.files[ 0 ] | 30 | file = torrent.files[ 0 ] |