forked from LBRYCommunity/lbry-sdk
handle get with file_name/download_directory/save_file arg for a stream that is already running
This commit is contained in:
parent
a212cf6ba4
commit
3c231d6215
1 changed files with 4 additions and 1 deletions
|
@ -342,6 +342,10 @@ class StreamManager:
|
||||||
if save_file and updated_stream.output_file_exists:
|
if save_file and updated_stream.output_file_exists:
|
||||||
save_file = False
|
save_file = False
|
||||||
await updated_stream.start(node=self.node, timeout=timeout, save_now=save_file)
|
await updated_stream.start(node=self.node, timeout=timeout, save_now=save_file)
|
||||||
|
if save_file or file_name or download_directory:
|
||||||
|
await updated_stream.save_file(
|
||||||
|
file_name=file_name, download_directory=download_directory, node=self.node
|
||||||
|
)
|
||||||
return updated_stream
|
return updated_stream
|
||||||
|
|
||||||
content_fee = None
|
content_fee = None
|
||||||
|
@ -382,7 +386,6 @@ class StreamManager:
|
||||||
stream.content_fee = await self.wallet.send_amount_to_address(
|
stream.content_fee = await self.wallet.send_amount_to_address(
|
||||||
lbc_to_dewies(str(fee_amount)), fee_address.encode('latin1')
|
lbc_to_dewies(str(fee_amount)), fee_address.encode('latin1')
|
||||||
)
|
)
|
||||||
|
|
||||||
log.info("paid fee of %s for %s", fee_amount, uri)
|
log.info("paid fee of %s for %s", fee_amount, uri)
|
||||||
|
|
||||||
self.streams[stream.sd_hash] = stream
|
self.streams[stream.sd_hash] = stream
|
||||||
|
|
Loading…
Reference in a new issue