forked from LBRYCommunity/lbry-sdk
Use same downloader for daemon as is used for console
Use lbrynet.lbryfilemanager.LBRYFileDownloader.ManagedLBRYFileDownloaderFact ory instead of lbrynet.lbryfile.client.LBRYFileDownloader.LBRYFileSaverFactory
This commit is contained in:
parent
120d7edf12
commit
905274d6d4
2 changed files with 5 additions and 5 deletions
|
@ -412,7 +412,7 @@ class LBRYDaemon(xmlrpc.XMLRPC):
|
|||
self.cur.execute("insert into history values (?, ?, ?)", vals)
|
||||
self.db.commit()
|
||||
else:
|
||||
print 'Already downloaded', path['stream_hash'], '->', path['path']
|
||||
print 'Already downloaded', path['stream_hash'], '-->', path['path']
|
||||
|
||||
return path
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ class GetStream(object):
|
|||
|
||||
def _handle_metadata(self, metadata):
|
||||
self.metadata = metadata
|
||||
self.factory = self.metadata.factories[0]
|
||||
self.factory = self.metadata.factories[1]
|
||||
return defer.succeed(None)
|
||||
|
||||
def _handle_download_error(self, err):
|
||||
|
@ -134,9 +134,9 @@ class GetStream(object):
|
|||
self.downloader.file_name)
|
||||
return self.downloader
|
||||
|
||||
self.downloader = self.factory.make_downloader(self.metadata, [self.data_rate, True], self.payment_rate_manager)
|
||||
self.downloader.addCallback(_set_downloader)
|
||||
return defer.succeed(self.downloader)
|
||||
downloader = self.factory.make_downloader(self.metadata, [self.data_rate, True], self.payment_rate_manager)
|
||||
downloader.addCallback(_set_downloader)
|
||||
return downloader
|
||||
|
||||
|
||||
class FetcherDaemon(object):
|
||||
|
|
Loading…
Reference in a new issue