The source project of this merge request has been removed.
Automatically do announce when trackers lists are merged
The improved usecase is following:
- User creates a new torrent with empty trackers list and starts its seeding. The torrent file is saved.
- User uploads a torrent file to torrent tracker website.
- The torrent tracker website updates trackers list in torrent file with its own urls and asks user to download it back.
- User opens the torrent file and trackers list is merged into existing empty one. ....
- 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.