forked from LBRYCommunity/lbry-sdk
fixing tests to work with asyncio daemon
This commit is contained in:
parent
7f838d3a31
commit
4bb8129bb7
25 changed files with 296 additions and 336 deletions
lbrynet/blob/client
|
@ -65,14 +65,9 @@ class EncryptedFileDownloader(CryptStreamDownloader):
|
|||
def _close_output(self):
|
||||
pass
|
||||
|
||||
def get_total_bytes(self):
|
||||
d = self.storage.get_blobs_for_stream(self.stream_hash)
|
||||
|
||||
def calculate_size(blobs):
|
||||
return sum([b.length for b in blobs])
|
||||
|
||||
d.addCallback(calculate_size)
|
||||
return d
|
||||
async def get_total_bytes(self):
|
||||
blobs = await self.storage.get_blobs_for_stream(self.stream_hash)
|
||||
return sum([b.length for b in blobs])
|
||||
|
||||
def get_total_bytes_cached(self):
|
||||
if self._calculated_total_bytes is None or self._calculated_total_bytes == 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue