From 1e6542d12dd446584305ea7975a542b58fdb9a61 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 14 Dec 2019 18:58:44 -0500 Subject: [PATCH] add --blocklist_channel_ids to claim_search command --- lbry/lbry/extras/daemon/Daemon.py | 4 ++++ lbry/lbry/wallet/server/session.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py index 57e66fb43..fd23476ba 100644 --- a/lbry/lbry/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -2152,6 +2152,7 @@ class Daemon(metaclass=JSONRPCServerType): [--claim_id= | --claim_ids=...] [--channel= | [[--channel_ids=...] [--not_channel_ids=...]]] + [--blocklist_channel_ids=...] [--has_channel_signature] [--valid_channel_signature | --invalid_channel_signature] [--is_controlling] [--release_time=] [--public_key_id=] [--timestamp=] [--creation_timestamp=] @@ -2192,6 +2193,9 @@ class Daemon(metaclass=JSONRPCServerType): use in conjunction with --valid_channel_signature --not_channel_ids=: (list) exclude claims signed by any of these channels (arguments must be claim ids of the channels) + --blocklist_channel_ids=: (list) channel_ids of channels containing + reposts of claims you want to be blocked from + search results --has_channel_signature : (bool) claims with a channel signature (valid or invalid) --valid_channel_signature : (bool) claims with a valid channel signature or no signature, use in conjunction with --has_channel_signature to diff --git a/lbry/lbry/wallet/server/session.py b/lbry/lbry/wallet/server/session.py index d36fcc64e..a349764d1 100644 --- a/lbry/lbry/wallet/server/session.py +++ b/lbry/lbry/wallet/server/session.py @@ -184,7 +184,7 @@ class LBRYElectrumX(ElectrumX): async def claimtrie_search(self, **kwargs): if kwargs: - kwargs['blocklist_channel_ids'] = self.filtering_channels_ids + kwargs.setdefault('blocklist_channel_ids', []).extend(self.filtering_channels_ids) return await self.run_and_cache_query('search', reader.search_to_bytes, kwargs) async def claimtrie_resolve(self, *urls):