Return only 'stream' claims when searching claims in a channel
belikor opened this issue · comments
belikor commented
Various operations such as download and delete can only be performed on downloadable content, that is, streams.
At the moment many functions depend on searching multiple claims from a channel by using search_ch.ch_search_latest
.
Instead of returning all types (streams, reposts, collections, livestreams) from the search, we should add an option to only return streams:
claims = ch_search_latest("@some-chn", number=12, only_streams=False)
streams = ch_search_latest("@some-chn", number=12, only_streams=True)
This can be implemented by specifying the claim_type
and using the has_source
parameter in claim_search
in lbrynet
:
lbrynet claim search --channel=@some-chn --claim_type=stream --has_source=True
Livestreams are of type 'stream'
but they don't have a source, so they are not downloadable, and should be avoided.