forked from LBRYCommunity/lbry-sdk
added protobuf to get and file_list commands
This commit is contained in:
parent
26fec098e4
commit
19f300cc45
1 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,11 @@ class ManagedStream:
|
|||
def metadata(self) ->typing.Optional[typing.Dict]:
|
||||
return None if not self.stream_claim_info else self.stream_claim_info.claim.stream.to_dict()
|
||||
|
||||
@property
|
||||
def metadata_protobuf(self) -> bytes:
|
||||
if self.stream_claim_info:
|
||||
return binascii.hexlify(self.stream_claim_info.claim.to_bytes())
|
||||
|
||||
@property
|
||||
def blobs_completed(self) -> int:
|
||||
return sum([1 if self.blob_manager.get_blob(b.blob_hash).get_is_verified() else 0
|
||||
|
@ -159,6 +164,7 @@ class ManagedStream:
|
|||
'nout': self.nout,
|
||||
'outpoint': self.outpoint,
|
||||
'metadata': self.metadata,
|
||||
'protobuf': self.metadata_protobuf,
|
||||
'channel_claim_id': self.channel_claim_id,
|
||||
'channel_name': self.channel_name,
|
||||
'claim_name': self.claim_name
|
||||
|
|
Loading…
Add table
Reference in a new issue