merge conflicts

This commit is contained in:
Jack Robison 2021-09-13 11:56:44 -04:00 committed by Victor Shyba
parent c00912015a
commit 1ec4111b9f
2 changed files with 5 additions and 8 deletions

View file

@ -58,7 +58,7 @@ FIELDS = {
TEXT_FIELDS = {'author', 'canonical_url', 'channel_id', 'description', 'claim_id', 'censoring_channel_id',
'media_type', 'normalized', 'public_key_bytes', 'public_key_id', 'short_url', 'signature',
'name', 'signature_digest', 'stream_type', 'title', 'tx_id', 'fee_currency', 'reposted_claim_id',
'name', 'signature_digest', 'title', 'tx_id', 'fee_currency', 'reposted_claim_id',
'tags'}
RANGE_FIELDS = {
@ -78,7 +78,7 @@ REPLACEMENTS = {
'trending_mixed': 'trending_score',
'normalized_name': 'normalized',
'reposted': 'repost_count',
# 'stream_types': 'stream_type',
# 'media_types': 'media_type',
'stream_types': 'stream_type',
'media_types': 'media_type',
'valid_channel_signature': 'is_signature_valid'
}

View file

@ -9,7 +9,6 @@ from typing import Optional, List, Iterable, Union
from elasticsearch import AsyncElasticsearch, NotFoundError, ConnectionError
from elasticsearch.helpers import async_streaming_bulk
from lbry.error import ResolveCensoredError, TooManyClaimSearchParametersError
from lbry.schema.result import Outputs, Censor
from lbry.schema.tags import clean_tags
@ -503,8 +502,8 @@ def expand_query(**kwargs):
value = CLAIM_TYPES[value]
else:
value = [CLAIM_TYPES[claim_type] for claim_type in value]
# elif key == 'stream_type':
# value = STREAM_TYPES[value] if isinstance(value, str) else list(map(STREAM_TYPES.get, value))
elif key == 'stream_type':
value = [STREAM_TYPES[value]] if isinstance(value, str) else list(map(STREAM_TYPES.get, value))
if key == '_id':
if isinstance(value, Iterable):
value = [item[::-1].hex() for item in value]
@ -512,8 +511,6 @@ def expand_query(**kwargs):
value = value[::-1].hex()
if not many and key in ('_id', 'claim_id') and len(value) < 20:
partial_id = True
if key == 'public_key_id':
value = Base58.decode(value)[1:21].hex()
if key in ('signature_valid', 'has_source'):
continue # handled later
if key in TEXT_FIELDS: