From dae4a1c0f8d8af2528d7e04fef2b8b65b2d52122 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Sep 2018 17:50:51 +0200 Subject: [PATCH] Improve webtorrent import error message when the torrent has multiple files --- server/helpers/webtorrent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 if (timer) clearTimeout(timer) return safeWebtorrentDestroy(webtorrent, torrentId, file.name, target.torrentName) - .then(() => rej(new Error('The number of files is not equal to 1 for ' + torrentId))) + .then(() => rej(new Error('Cannot import torrent ' + torrentId + ': there are multiple files in it'))) } file = torrent.files[ 0 ] -- 2.41.0