-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new Transfers menu to allow pause all and resume all torrents #1043
Conversation
@feross Let me know what you think of this :) |
if (torrentSummary.status === 'downloading') { | ||
torrentSummary.status = 'paused' | ||
ipcRenderer.send('wt-stop-torrenting', torrentSummary.infoHash) | ||
sound.play('DISABLE') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could sound.play
be moved outside the forEach
loop? This could get funky if there is a large number of torrents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I can do that.
@Flet Done! |
@Flet Bump! Is there anything stopping this from getting merged? Would love to do it so that this gets merged :) |
@@ -128,6 +128,26 @@ module.exports = class TorrentListController { | |||
} | |||
} | |||
|
|||
pauseAllTorrents () { | |||
this.state.saved.torrents.forEach((torrentSummary) => { | |||
if (torrentSummary.status === 'downloading') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that if a torrent is seeding it is not paused... Does it make sense to pause torrents that are seeding too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Flet Yes, I think it does. 🤔 I did not think about it. Thanks for bringing it up! Should I add it in the implementation? I can do it in a few minutes if you're around.
@Flet Oh, I understand. I'll update the PR to include |
I've added the condition for checking |
Yeah, I think its OK. We can always make it more articulate later if folks feel pain. |
LGTM! |
Fixes #1027