Closed qstokkink closed 2 months ago
To my surprise, if I change the following line
to
health = aggregate_responses_for_infohash(infohash, cast(List[TrackerResponse], []))
everything starts working (I still have no idea why this could be).
I think this logic is wrong. Consider
aggregate_responses_for_infohash
takes the latest tracker responses and picks the most likely correct health. Then, this fresh valid tracker data is not stored in the database (???), only if there was no tracker data, with 0 seeders and 0 leechers, do we store the result (!?).
I think the check should be as follows:
if health.last_check == 0:
self.notify(health) # We don't need to store this in the db, but we still need to notify the GUI
else:
self.update_torrent_health(health)
After clicking the health of all the torrents in my search results I get a lot of seemingly dead torrents:
However, after waiting a few seconds and clicking them all again, the torrents come back alive: