Fix selectFiles error, fixes #891
This commit is contained in:
@@ -127,7 +127,9 @@ module.exports = class TorrentListController {
|
||||
torrentSummary.selections[index] = !torrentSummary.selections[index]
|
||||
|
||||
// Let the WebTorrent process know to start or stop fetching that file
|
||||
ipcRenderer.send('wt-select-files', infoHash, torrentSummary.selections)
|
||||
if (torrentSummary.status !== 'paused') {
|
||||
ipcRenderer.send('wt-select-files', infoHash, torrentSummary.selections)
|
||||
}
|
||||
}
|
||||
|
||||
confirmDeleteTorrent (infoHash, deleteData) {
|
||||
|
||||
@@ -350,6 +350,9 @@ function selectFiles (torrentOrInfoHash, selections) {
|
||||
} else {
|
||||
torrent = torrentOrInfoHash
|
||||
}
|
||||
if (!torrent) {
|
||||
throw new Error('selectFiles: missing torrent ' + torrentOrInfoHash)
|
||||
}
|
||||
|
||||
// Selections not specified?
|
||||
// Load all files. We still need to replace the default whole-torrent
|
||||
|
||||
Reference in New Issue
Block a user