Clean up showCreateTorrent
This commit is contained in:
@@ -148,7 +148,7 @@ function processArgv (argv) {
|
||||
if (pathsToOpen.length > 0) openFilePaths(pathsToOpen)
|
||||
}
|
||||
|
||||
// Convert paths to {name, path, size} objects, then send to renderer process
|
||||
// Send files to the renderer process
|
||||
// Opening files means either adding torrents, creating and seeding a torrent
|
||||
// from files, or adding subtitles
|
||||
function openFilePaths (paths) {
|
||||
|
||||
@@ -189,8 +189,7 @@ function showOpenSeedFile () {
|
||||
properties: [ 'openFile' ]
|
||||
}, function (selectedPaths) {
|
||||
if (!Array.isArray(selectedPaths)) return
|
||||
var selectedPath = selectedPaths[0]
|
||||
windows.main.send('dispatch', 'showCreateTorrent', selectedPath)
|
||||
windows.main.send('dispatch', 'showCreateTorrent', selectedPaths)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -202,8 +201,7 @@ function showOpenSeedFiles () {
|
||||
properties: [ 'openFile', 'openDirectory' ]
|
||||
}, function (selectedPaths) {
|
||||
if (!Array.isArray(selectedPaths)) return
|
||||
var selectedPath = selectedPaths[0]
|
||||
windows.main.send('dispatch', 'showCreateTorrent', selectedPath)
|
||||
windows.main.send('dispatch', 'showCreateTorrent', selectedPaths)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user