Skip to content
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

WebTorrent: Add "Save All Files..." feature #3146

Merged
merged 1 commit into from
Aug 13, 2019
Merged

Conversation

feross
Copy link
Contributor

@feross feross commented Aug 10, 2019

Currently there is no ability to save all files at once. The user has to save each file separately. This PR fixes that.

Fixes: brave/brave-browser#1230

Submitter Checklist:

Test Plan:

  1. Visit https://webtorrent.io/free-torrents
  2. Click on the WIRED CD torrent
  3. Click start download
  4. Try to click on the disabled "Save All Files..." link before the download has completed. Confirm that it doesn't work.
  5. Once the download is complete, click on "Save All Files...". It should prompt for a location to save the .zip file to.
  6. Unzip the zip file however you do that on your OS and confirm that the torrent's files are inside.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@feross feross added the feature/webtorrent Label for webtorrent related issues label Aug 10, 2019
@feross feross added this to the 0.70.x - Nightly milestone Aug 10, 2019
@feross feross self-assigned this Aug 10, 2019
@feross feross requested a review from yrliou August 10, 2019 05:32
@feross feross force-pushed the webtorrent-save-all2 branch 3 times, most recently from 2017846 to e515586 Compare August 10, 2019 05:55
"@types/parse-torrent": "^5.8.3",
"@types/webtorrent": "^0.98.5",
"bignumber.js": "^7.2.1",
"bluebird": "^3.5.1",
"clipboard-copy": "^2.0.0",
"jszip": "^3.2.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @diracdeltas for adding a new dep here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@@ -7,7 +7,7 @@
"scripts": ["extension/out/brave_webtorrent_background.bundle.js"],
"persistent": true
},
"permissions": ["dns", "tabs", "windows", "<all_urls>"],
"permissions": ["downloads", "dns", "tabs", "windows", "<all_urls>"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @diracdeltas for granting a new permission to webtorrent extension.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok

Currently there is no ability to save all files at once. User has to save each file separately. This commit fixes that.

Fixes: brave/brave-browser#1230
@feross feross force-pushed the webtorrent-save-all2 branch from e515586 to 31af2e6 Compare August 13, 2019 20:18
@feross
Copy link
Contributor Author

feross commented Aug 13, 2019

Force pushed with the stray console.log removed.

Copy link
Member

@yrliou yrliou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codes LGTM and test plan works fine.

@yrliou yrliou modified the milestones: 0.70.x - Dev, 0.71.x - Nightly Aug 13, 2019
@yrliou
Copy link
Member

yrliou commented Aug 13, 2019

I'm going to merge it here without waiting for CI again since the latest force push only had a console.log removed and things are already green before this force push.

@yrliou yrliou merged commit 6dc37b8 into master Aug 13, 2019
@yrliou yrliou deleted the webtorrent-save-all2 branch August 13, 2019 21:23
cezaraugusto added a commit that referenced this pull request Aug 14, 2019
fix brave/brave-browser#5662

storybook went broken after #3146.
this PR fixes it by updating webtorrent's props in storybook
@cezaraugusto cezaraugusto mentioned this pull request Aug 14, 2019
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/webtorrent Label for webtorrent related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebTorrent: Add "Save All Files..." feature
3 participants