@@ -114,19 +114,18 @@ function sliceArgv (argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function processArgv (argv) {
|
function processArgv (argv) {
|
||||||
argv.forEach(function (argvi) {
|
argv.forEach(function (arg) {
|
||||||
switch (argvi) {
|
if (arg === '-n') {
|
||||||
case '-n':
|
|
||||||
windows.main.send('dispatch', 'showCreateTorrent')
|
windows.main.send('dispatch', 'showCreateTorrent')
|
||||||
break
|
} else if (arg === '-o') {
|
||||||
case '-o':
|
|
||||||
windows.main.send('dispatch', 'showOpenTorrentFile')
|
windows.main.send('dispatch', 'showOpenTorrentFile')
|
||||||
break
|
} else if (arg === '-u') {
|
||||||
case '-u':
|
|
||||||
windows.main.send('showOpenTorrentAddress')
|
windows.main.send('showOpenTorrentAddress')
|
||||||
break
|
} else if (arg.startsWith('-psn')) {
|
||||||
default:
|
// Ignore OS X launchd "process serial number" argument
|
||||||
windows.main.send('dispatch', 'onOpen', argvi)
|
// More: https://github.com/feross/webtorrent-desktop/issues/214
|
||||||
|
} else {
|
||||||
|
windows.main.send('dispatch', 'onOpen', arg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user