forked from LBRYCommunity/lbry-sdk
Fix get_downloads function
get_downloads would throw an error when it tried to open a file that had already been downloaded, now it just ignores these duplicates
This commit is contained in:
parent
441d3c1220
commit
526075cd5e
1 changed files with 9 additions and 3 deletions
|
@ -242,9 +242,15 @@ class LBRYDaemon(xmlrpc.XMLRPC):
|
|||
Get downloads
|
||||
"""
|
||||
|
||||
downloads = [{'stream_hash': stream.stream_hash,
|
||||
'path': os.path.join(stream.downloader.download_directory, stream.downloader.file_name)}
|
||||
for stream in self.download_deferreds]
|
||||
downloads = []
|
||||
|
||||
for stream in self.download_deferreds:
|
||||
try:
|
||||
downloads.append({'stream_hash': stream.stream_hash,
|
||||
'path': os.path.join(stream.downloader.download_directory, stream.downloader.file_name)})
|
||||
except:
|
||||
pass
|
||||
|
||||
return downloads
|
||||
|
||||
def xmlrpc_download_name(self, name):
|
||||
|
|
Loading…
Reference in a new issue