Convert Create Torrent modal to page, clean up App

This commit is contained in:
DC
2016-04-21 02:57:43 -07:00
committed by DC
parent 31ef283e7b
commit 1479369db1
7 changed files with 280 additions and 164 deletions

View File

@@ -95,8 +95,9 @@ function stopTorrenting (infoHash) {
// Create a new torrent, start seeding
function createTorrent (torrentKey, options) {
console.log('creating torrent %s', torrentKey, options)
var torrent = client.seed(options.files, options)
console.log('creating torrent', torrentKey, options)
var paths = options.files.map((f) => f.path)
var torrent = client.seed(paths, options)
torrent.key = torrentKey
addTorrentEvents(torrent)
ipc.send('wt-new-torrent')