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.cur.execute("insert into history values (?, ?, ?)", vals)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
else:
|
else:
|
||||||
print 'Already downloaded', path['stream_hash'], '->', path['path']
|
print 'Already downloaded', path['stream_hash'], '-->', path['path']
|
||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class GetStream(object):
|
||||||
|
|
||||||
def _handle_metadata(self, metadata):
|
def _handle_metadata(self, metadata):
|
||||||
self.metadata = metadata
|
self.metadata = metadata
|
||||||
self.factory = self.metadata.factories[0]
|
self.factory = self.metadata.factories[1]
|
||||||
return defer.succeed(None)
|
return defer.succeed(None)
|
||||||
|
|
||||||
def _handle_download_error(self, err):
|
def _handle_download_error(self, err):
|
||||||
|
@ -134,9 +134,9 @@ class GetStream(object):
|
||||||
self.downloader.file_name)
|
self.downloader.file_name)
|
||||||
return self.downloader
|
return self.downloader
|
||||||
|
|
||||||
self.downloader = self.factory.make_downloader(self.metadata, [self.data_rate, True], self.payment_rate_manager)
|
downloader = self.factory.make_downloader(self.metadata, [self.data_rate, True], self.payment_rate_manager)
|
||||||
self.downloader.addCallback(_set_downloader)
|
downloader.addCallback(_set_downloader)
|
||||||
return defer.succeed(self.downloader)
|
return downloader
|
||||||
|
|
||||||
|
|
||||||
class FetcherDaemon(object):
|
class FetcherDaemon(object):
|
||||||
|
|
Loading…
Reference in a new issue