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

incorrect value of file progress. file progress less than 0 #1552

Closed
De-Zol opened this issue Nov 23, 2018 · 3 comments
Closed

incorrect value of file progress. file progress less than 0 #1552

De-Zol opened this issue Nov 23, 2018 · 3 comments
Labels

Comments

@De-Zol
Copy link

@De-Zol De-Zol commented Nov 23, 2018

What version of WebTorrent?
0.102.4

What operating system and Node.js version?
Window 10, Nodejs 10.11.0

After stopping and resuming torrent download progress of files is calculated incorrect.

I am stopping torrent according to documentation (#164) by deselecting whole torrent (torrent.deselect(0, torrent.pieces.length - 1, 0)) and then deselecting each file (file.deselect()). When I want to resume torrent download, I am selecting all files (file.select()). and after that i am receiving incorrect progress of files

How can I solve this problem?

note* I am using electron v3.0.6

@KayleePop

This comment has been minimized.

Copy link
Contributor

@KayleePop KayleePop commented Nov 23, 2018

Is this a duplicate of #1515?

@De-Zol

This comment has been minimized.

Copy link
Author

@De-Zol De-Zol commented Nov 26, 2018

Is this a duplicate of #1515?

You are right, it`s the same problem. And fixing of my bag by replacing - this.offset with - (this.offset % pieceLength) also works for me
Could that fix be added to your library?

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Feb 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Feb 24, 2019
@De-Zol De-Zol closed this Feb 24, 2019
corwin-of-amber added a commit to corwin-of-amber/webtorrent that referenced this issue Mar 11, 2019
DiegoRBaquero added a commit that referenced this issue Mar 11, 2019
Fixes #1515, #1552.
@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.