go-rtorrent
go-rtorrent copied to clipboard
Add tracker reannounce and fix tests
Hello,
The changes are the following:
- Added the function
ReAnnounce
to trigger a reannounce to all trackers of a torrent (usesd.tracker_announce
). - Added the
Tracker
structure. - Added the function
GetTrackers
to get all trackers of a torrent. - Fixed the torrent used for testing (as well as its checks), since doesn't seem to be hosted anymore on Fedora's website.
- Added tests for the tracker reannounce feature.
The spacing changes on comments were done by the formatter, feel free to dismiss those.
I'd like to expand upon the tracker structure and functions to provide more information and features, but I'd prefer listening to your opinion first.
Also, in the README it is stated Delete a torrent (including files)
as a feature. If this refers to the Delete
function and I'm not mistaken, d.erase
does not delete the data files (src).
It is my first time dealing with Go, so any feedback is greatly appreciated.
Thanks a lot.
Added some more fields to Trackers
and fixed tests (I had forgotten about the .torrent file in the repo).
Not a huge fan of having to add a loop to test reannounce, but for whatever reason the tracker wasn't getting updated in time. Either I screwed up or it's something on Fedora's end, I don't know.
Would love to hear your thoughts on how to test Peers
and FailedCounter
. I couldn't come up with a good, consistent, way.
Hopefully this gets reviewed and added :D