This means people who add a lot of torrents will always have their latest torrents at the top when they open the app, instead of having to scroll all the way down
HACK: OS X: Disable WebRTC peers to fix 100% CPU issue caused by Chrome
bug.
Fixed in Chrome 51, so we can remove this hack once Electron updates
Chrome.
For #353.
This bug was subtle. Basically, on OS X only, we use
window.setAspectRatio() to make the player window match the video size.
But this is maintained even in fullscreen mode, which makes the window
actually not use up the fullscreen, and there are black bars above and
below the video player controls, which looks really weird.
Unset the aspect ratio in fullscreen mode, then set it again upon
leaving fullscreen mode.
Apparently, electron.* is actually a getter, so whenever a component of
electron is referenced for the first time, it's require()'d. So, there
are theoretical performance benefits to not declaring all electron.*
upfront.
Instead of:
var autoUpdater = electron.autoUpdater
Just use electron.autoUpdater directly when needed.
The goal here is to remove shortcut handling from the renderer and
unify it all in menu.js and shortcuts.ks (for alternate shortcuts).
I would rather name it "Play" and change to "Pause" when video is
playing, but Electron doesn't support this (yet).
The goal of this commit is to merge the two torrent status lines onto a
single, concise line which has high signal and information density.
- Hide download speed, upload speed, and number of peers when 0,
because that's just noise.
- Remove number of files, because that information can be found by
expanding the torrent.
This also allowed the further reduction of the torrent item height from
110px to 100px.
WebTorrent 0.91 changed how duplicate torrents are handled, which broke
handling in WebTorrent Desktop.
After this PR:
- No more try-catch on client.add -- this has never thrown errors.
- No check for duplicate torrent.key value since client.add no longer
returns the same torrent object when adding a duplicate torrent. It
emits 'error' instead, and that case is already handled :)