From 19f300cc4589788eccd3fa512b34b05264ecfd15 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sun, 21 Apr 2019 13:51:10 -0400 Subject: [PATCH] added protobuf to get and file_list commands --- lbrynet/stream/managed_stream.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lbrynet/stream/managed_stream.py b/lbrynet/stream/managed_stream.py index 545d86d62..c5d41d58b 100644 --- a/lbrynet/stream/managed_stream.py +++ b/lbrynet/stream/managed_stream.py @@ -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