Skip to content

Automatically do announce when trackers lists are merged

Alexander Trufanov requested to merge (removed):announce into master

The improved usecase is following:

  1. User creates a new torrent with empty trackers list and starts its seeding. The torrent file is saved.
  2. User uploads a torrent file to torrent tracker website.
  3. The torrent tracker website updates trackers list in torrent file with its own urls and asks user to download it back.
  4. User opens the torrent file and trackers list is merged into existing empty one. ....
  5. After 20 mins you see 10 leachers for your torrent on tracker website and no seeders because there were no announce send yet. So you have to run Manual Announce from context menu or wait longer while you peers shame you on tracker's forum.

This small patch runs announce automatically when trackers lists were merged.

A. Perhaps it would be more fancy to make TrackersList::merge() return bool if old list was changed but its in libktorrent and I wouldn't want to break libktorrent API compatibility again for such a rare usecase. So just comparing getTrackers().count().
B. The announce code is taken from View::manualAnnounce()
C. The tor->updateTracker(); will send announce req to all trackers in the list while sending to only newly added would be enough but this would be even much more (than A.) annoying to implement.

Merge request reports