Improve webtorrent import error message when the torrent has multiple

files
This commit is contained in:
Chocobozzz 2018-09-17 17:50:51 +02:00
parent a8ecc6f670
commit dae4a1c0f8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ function downloadWebTorrentVideo (target: { magnetUri: string, torrentName?: str
if (timer) clearTimeout(timer) if (timer) clearTimeout(timer)
return safeWebtorrentDestroy(webtorrent, torrentId, file.name, target.torrentName) 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 ] file = torrent.files[ 0 ]