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