fix false negative with file completed field

This commit is contained in:
Jack Robison 2019-05-24 11:51:10 -04:00
parent 3ed72a215e
commit 4f8bcfcd18
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -217,7 +217,8 @@ class ManagedStream:
written_bytes = None written_bytes = None
return { return {
'streaming_url': f"http://{self.config.streaming_host}:{self.config.streaming_port}/stream/{self.sd_hash}", '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]), self.blob_manager.is_blob_verified(b.blob_hash) for b in self.descriptor.blobs[:-1]),
'file_name': file_name, 'file_name': file_name,
'download_directory': download_directory, 'download_directory': download_directory,