diff --git a/lbrynet/lbryfile/client/EncryptedFileDownloader.py b/lbrynet/lbryfile/client/EncryptedFileDownloader.py index f8e4396de..092c5ae8a 100644 --- a/lbrynet/lbryfile/client/EncryptedFileDownloader.py +++ b/lbrynet/lbryfile/client/EncryptedFileDownloader.py @@ -139,8 +139,8 @@ class EncryptedFileDownloaderFactory(object): def can_download(self, sd_validator): return True - def make_downloader(self, metadata, options, payment_rate_manager, **kwargs): - payment_rate_manager.min_blob_data_payment_rate = options[0] + def make_downloader(self, metadata, data_rate, payment_rate_manager, **kwargs): + payment_rate_manager.min_blob_data_payment_rate = data_rate def save_source_if_blob(stream_hash): if metadata.metadata_source == StreamMetadata.FROM_BLOB: diff --git a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py index 14f127ecd..b257f4994 100644 --- a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py +++ b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py @@ -149,10 +149,8 @@ class ManagedEncryptedFileDownloaderFactory(object): return True @defer.inlineCallbacks - def make_downloader(self, metadata, options, payment_rate_manager, download_directory=None, + def make_downloader(self, metadata, data_rate, payment_rate_manager, download_directory=None, file_name=None): - # TODO: change options argument to only be data_rate - data_rate = options[0] stream_hash = yield save_sd_info(self.lbry_file_manager.stream_info_manager, metadata.validator.raw_info) if metadata.metadata_source == StreamMetadata.FROM_BLOB: diff --git a/lbrynet/lbrylive/client/LiveStreamDownloader.py b/lbrynet/lbrylive/client/LiveStreamDownloader.py index 913aba7dc..4b152f22a 100644 --- a/lbrynet/lbrylive/client/LiveStreamDownloader.py +++ b/lbrynet/lbrylive/client/LiveStreamDownloader.py @@ -141,7 +141,7 @@ class FullLiveStreamDownloaderFactory(object): def can_download(self, sd_validator): return True - def make_downloader(self, metadata, options, payment_rate_manager): + def make_downloader(self, metadata, data_rate, payment_rate_manager): # TODO: check options for payment rate manager parameters prm = LiveStreamPaymentRateManager(self.default_payment_rate_manager, payment_rate_manager) diff --git a/lbrynet/lbrynet_daemon/Downloader.py b/lbrynet/lbrynet_daemon/Downloader.py index abcc351ac..0db02ee44 100644 --- a/lbrynet/lbrynet_daemon/Downloader.py +++ b/lbrynet/lbrynet_daemon/Downloader.py @@ -119,11 +119,13 @@ class GetStream(object): @defer.inlineCallbacks def get_downloader(self, factory, stream_metadata): - downloader_options = [self.data_rate, True] - downloader = yield factory.make_downloader(stream_metadata, downloader_options, - self.payment_rate_manager, - download_directory=self.download_directory, - file_name=self.file_name) + downloader = yield factory.make_downloader( + stream_metadata, + self.data_rate, + self.payment_rate_manager, + download_directory=self.download_directory, + file_name=self.file_name + ) defer.returnValue(downloader) def _pay_key_fee(self, address, fee_lbc, name):