Skip to content

Commit

Permalink
Merge pull request #5751 from drew2a/feature/5642-2
Browse files Browse the repository at this point in the history
Remove enable_resolve_unknown_torrents_feature
  • Loading branch information
drew2a committed Nov 26, 2020
2 parents 2b9f9f5 + e977334 commit aac6101
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class PopularityCommunity(RemoteQueryCommunity):
community_id = unhexlify('9aca62f878969c437da9844cba29a134917e1648')

def __init__(self, *args, **kwargs):
# this flag enables or disables https://github.com/Tribler/tribler/pull/5657
self.enable_resolve_unknown_torrents_feature = True

self.torrent_checker = kwargs.pop('torrent_checker', None)

super(PopularityCommunity, self).__init__(*args, **kwargs)
Expand Down Expand Up @@ -119,11 +116,10 @@ async def process_torrents_health(self, peer, torrent_healths):
self.logger.info(f"{hexlify(infohash)} updated ({seeders},{leechers})")
elif not torrent_state:
self.mds.TorrentState(infohash=infohash, seeders=seeders,
leechers=leechers, last_check=last_check)
leechers=leechers, last_check=last_check)
self.logger.info(f"{hexlify(infohash)} added ({seeders},{leechers})")
infohashes_to_resolve.append(infohash)

if self.enable_resolve_unknown_torrents_feature:
for infohash in infohashes_to_resolve:
# Get a single result per infohash to avoid duplicates
self.send_remote_select(peer=peer, infohash=hexlify(infohash), last=1)
for infohash in infohashes_to_resolve:
# Get a single result per infohash to avoid duplicates
self.send_remote_select(peer=peer, infohash=hexlify(infohash), last=1)

0 comments on commit aac6101

Please sign in to comment.