-
Notifications
You must be signed in to change notification settings - Fork 384
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
onTorrentStarted called twice #117
Comments
You're right, fixed.
I'm afraid that it's not possible currently, so the user has to track this mapping manually. |
One question, tried to check the code but since it is all futures/multi-threaded stuff I have little idea of what it is doing internally. Before on first onTorrentStarted there was no data descriptor, on second onTorrentStarted the DataDescriptor existed. Now I guess there is only one call to onTorrentStarted and the DataDescriptor exists right? There is another feature request (maybe bug?) Lets say I have a torrent with 100 pieces (chunks). I download half (50 pieces) and stop it. After I resume the first 50 pieces are skipped and the last 50 downloaded. I imagine those 50 first pieces are checked to see if there are valid but it seems the onPieceVerified event is not called for those 50 first pieces. Since they are being verified when the torrent resumed I think the event should be called as well. |
Yes, there is one call to onTorrentStarted, but the DataDescriptor does not exist yet. It will be present when onMetadataAvailable is called.
Yes, existing data is verified, when resuming partially downloaded torrent. But, indeed, it does not notify listeners. Thank you for letting me know, I'll create a new issue. |
From what I understand and the tests I've run (version 1.8), when a torrent is started, the onTorrentStarted event is called twice, once when the client starts (no DataDescriptor available) and again when the metadata is parsed/received (the DataDescriptor is available).
Why not instead of calling the same event twice which is confusing (it's already started, why do it again) add a new event onMetadataReceived(TorrentMetadataEvent) with the DataDescriptor as part of the event?
Also is there a way to get the BtClient/BtRuntime from the TorrentId and viceversa?
The text was updated successfully, but these errors were encountered: