Based on @watson's PR #463.
Differences:
- Remove the "Open Folder" link from expanded torrent view.
- Use showItemInFolder instead of openItem electron API
- Add a separator
- Use IPC to invoke electron.shell.showItemInFolder from main process
This was a rare race condition during app shutdown where a 'wt-'
message would be sent from the hidden webtorrent window to the main
window after the main window was already closed.
Fixes#373
* Separate hidden window, with its own renderer process, for WebTorrent
(Must be a window. You cannot run WebRTC at all in a Web Worker, and you can't
run it well in a node process like the electron main process.)
* Disabled the create-torrent-modal for now. That gives us a consistent UX
regardless of whether the user dragged files or folders onto the app or opened
the Create New Torrent menu item.
* Main process routes all messages between the main and webtorrent windows.
* The renderer index.js is smaller now (but still too big), with the WebTorrent
interface moved to webtorrent.js / it's own process.
* The UI should be faster now, and should not lag under load.
We got the window to run less JS but now it’s shown by the main process
too soon! This fixes that with a setTimeout.
Perhaps when this issue is fixed
(https://github.com/atom/electron/issues/861) we can remove the timeout.
`globalShortcut` will register the shortcut at the OS level, even when
the app is not focused.
Using `localShortcut` would work, but let's put it in the top menu
instead, where all the other shortcuts are.
* Don't attempt to change size when maximized or fullscreen
* Bugfix: restore window size correctly when returning from a video so big that it that caused the window to maximize
* Finishes the saved torrents feature!
* Torrents load and save correctly. Poster is autogenerated only once.
* Torrents can be paused and restarted
* Download button indicates state:
- White means paused
- Pulsating green means downloading
- Solid green means finished downloading, only seeding