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

Add tracker reannounce and fix tests #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Egoistically
Copy link

@Egoistically Egoistically commented Aug 28, 2023

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
Copy link
Author

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.

@ac1dburnz
Copy link

Hopefully this gets reviewed and added :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants