From bfb73921988cc5dfb109af67da7f5fef2128c178 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 3 Oct 2017 14:37:15 +0200 Subject: [PATCH] Site has optional files if any of the peers has hashfield --- plugins/PeerDb/PeerDbPlugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/PeerDb/PeerDbPlugin.py b/plugins/PeerDb/PeerDbPlugin.py index 5e968b8b..e88e0cb3 100644 --- a/plugins/PeerDb/PeerDbPlugin.py +++ b/plugins/PeerDb/PeerDbPlugin.py @@ -50,6 +50,8 @@ class ContentDbPlugin(object): if row["address"].endswith(".onion"): peer.reputation = peer.reputation / 2 # Onion peers less likely working num += 1 + if num_hashfield: + site.content_manager.has_optional_files = True site.log.debug("%s peers (%s with hashfield) loaded in %.3fs" % (num, num_hashfield, time.time() - s)) def iteratePeers(self, site):