From f766dbefe0760062a58b83ca73814fa8d61107db Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 5 Feb 2019 00:23:04 -0300 Subject: [PATCH] announce and set completed after inserts --- lbrynet/stream/assembler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbrynet/stream/assembler.py b/lbrynet/stream/assembler.py index 39761fa1f..8c30c5875 100644 --- a/lbrynet/stream/assembler.py +++ b/lbrynet/stream/assembler.py @@ -74,17 +74,17 @@ class StreamAssembler: raise OSError(f"output directory does not exist: '{output_dir}' '{output_file_name}'") await self.setup() self.sd_blob = await self.get_blob(self.sd_hash) - await self.blob_manager.blob_completed(self.sd_blob) self.descriptor = await StreamDescriptor.from_stream_descriptor_blob(self.loop, self.blob_manager.blob_dir, self.sd_blob) self.output_path = await get_next_available_file_name(self.loop, output_dir, output_file_name or self.descriptor.suggested_file_name) if not self.got_descriptor.is_set(): self.got_descriptor.set() - await self.after_got_descriptor() await self.blob_manager.storage.store_stream( self.sd_blob, self.descriptor ) + await self.blob_manager.blob_completed(self.sd_blob) + await self.after_got_descriptor() with open(self.output_path, 'wb') as stream_handle: self.stream_handle = stream_handle for blob_info in self.descriptor.blobs[:-1]: