go-rtorrent icon indicating copy to clipboard operation
go-rtorrent copied to clipboard

Add tracker reannounce and fix tests

Open Egoistically opened this issue 1 year ago • 2 comments

Hello,

The changes are the following:

  • Added the function ReAnnounce to trigger a reannounce to all trackers of a torrent (uses d.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.

Egoistically avatar Aug 28 '23 01:08 Egoistically

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.

Egoistically avatar Aug 28 '23 15:08 Egoistically

Hopefully this gets reviewed and added :D

ac1dburnz avatar Feb 12 '24 16:02 ac1dburnz