forked from LBRYCommunity/lbry-sdk
fix tests
This commit is contained in:
parent
722b42a93e
commit
af22646322
1 changed files with 25 additions and 8 deletions
|
@ -594,17 +594,34 @@ class LevelDB:
|
|||
)
|
||||
return
|
||||
if reposted_metadata:
|
||||
reposted_tags = [] if not reposted_metadata.is_stream else [tag for tag in reposted_metadata.stream.tags]
|
||||
reposted_languages = [] if not reposted_metadata.is_stream else (
|
||||
[lang.language or 'none' for lang in reposted_metadata.stream.languages] or ['none']
|
||||
)
|
||||
if reposted_metadata.is_stream:
|
||||
meta = reposted_metadata.stream
|
||||
elif reposted_metadata.is_channel:
|
||||
meta = reposted_metadata.channel
|
||||
elif reposted_metadata.is_collection:
|
||||
meta = reposted_metadata.collection
|
||||
elif reposted_metadata.is_repost:
|
||||
meta = reposted_metadata.repost
|
||||
else:
|
||||
return
|
||||
reposted_tags = [tag for tag in meta.tags]
|
||||
reposted_languages = [lang.language or 'none' for lang in meta.languages] or ['none']
|
||||
|
||||
reposted_has_source = False if not reposted_metadata.is_stream else reposted_metadata.stream.has_source
|
||||
reposted_claim_type = CLAIM_TYPES[reposted_metadata.claim_type]
|
||||
|
||||
claim_tags = [] if not metadata.is_stream else [tag for tag in metadata.stream.tags]
|
||||
claim_languages = [] if not metadata.is_stream else (
|
||||
[lang.language or 'none' for lang in metadata.stream.languages] or ['none']
|
||||
)
|
||||
if metadata.is_stream:
|
||||
meta = metadata.stream
|
||||
elif metadata.is_channel:
|
||||
meta = metadata.channel
|
||||
elif metadata.is_collection:
|
||||
meta = metadata.collection
|
||||
elif metadata.is_repost:
|
||||
meta = metadata.repost
|
||||
else:
|
||||
return
|
||||
claim_tags = [tag for tag in meta.tags]
|
||||
claim_languages = [lang.language or 'none' for lang in meta.languages] or ['none']
|
||||
|
||||
tags = list(set(claim_tags).union(set(reposted_tags)))
|
||||
languages = list(set(claim_languages).union(set(reposted_languages)))
|
||||
|
|
Loading…
Reference in a new issue