Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to stop/resume torrent ? #1004
Comments
This comment has been minimized.
This comment has been minimized.
I would be very surprised if |
This comment has been minimized.
This comment has been minimized.
|
My function to add a torrent :
It work the first time I add the torrent but if I remove it I can't add it again. Remove work, but the callback for |
This comment has been minimized.
This comment has been minimized.
|
It looks like you're not actually removing the torrent. The callback to var torrent = client.add(...)
torrent.on('infohash', onInfoHash)
torrent.on('ready,' onReady)Note: The callback to |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
I'm using webtorrent server side
npm : 3.10.5
webtorrent : 0.98.0
torrent.pause() only stop connecting to new peers so it doesn't stop torrent, I used :
client.remove(mytorrent.infoHash)and later :
Can't add torrent again, the torrent exists in the client but it never start, there is no metadata. I need to stop my nodejs app and restart it to add it again.
Is there an efficient way to stop/resume torrent ?
Not sure if it's the right place to ask this.
EDIT
I found a solution :
stop :
resume :
Probably not the best but it's the only way I found, what do you think about it ? is there a better way ?