From 4f8bcfcd18ba9ad56dac4cefd73cff9929abb240 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 24 May 2019 11:51:10 -0400 Subject: [PATCH] fix false negative with file `completed` field --- lbrynet/stream/managed_stream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/stream/managed_stream.py b/lbrynet/stream/managed_stream.py index 64e31feed..d1f66603e 100644 --- a/lbrynet/stream/managed_stream.py +++ b/lbrynet/stream/managed_stream.py @@ -217,7 +217,8 @@ class ManagedStream: written_bytes = None return { 'streaming_url': f"http://{self.config.streaming_host}:{self.config.streaming_port}/stream/{self.sd_hash}", - 'completed': (self.output_file_exists and self.status in ('stopped', 'finished')) or all( + 'completed': (self.output_file_exists and (self.status in ('stopped', 'finished')) + or not self.saving.is_set()) or all( self.blob_manager.is_blob_verified(b.blob_hash) for b in self.descriptor.blobs[:-1]), 'file_name': file_name, 'download_directory': download_directory,