Esempio n. 1
0
 def start_lbry_file(self,
                     rowid,
                     stream_hash,
                     payment_rate_manager,
                     blob_data_rate=None,
                     download_directory=None,
                     file_name=None):
     if not download_directory:
         download_directory = self.download_directory
     payment_rate_manager.min_blob_data_payment_rate = blob_data_rate
     lbry_file_downloader = ManagedEncryptedFileDownloader(
         rowid,
         stream_hash,
         self.session.peer_finder,
         self.session.rate_limiter,
         self.session.blob_manager,
         self.stream_info_manager,
         self,
         payment_rate_manager,
         self.session.wallet,
         download_directory,
         file_name=file_name)
     yield lbry_file_downloader.set_stream_info()
     self.lbry_files.append(lbry_file_downloader)
     defer.returnValue(lbry_file_downloader)
Esempio n. 2
0
 def _get_lbry_file(self,
                    rowid,
                    stream_hash,
                    payment_rate_manager,
                    sd_hash,
                    key,
                    stream_name,
                    suggested_file_name,
                    download_directory=None):
     download_directory = download_directory or self.download_directory
     payment_rate_manager = payment_rate_manager or self.session.payment_rate_manager
     return ManagedEncryptedFileDownloader(
         rowid,
         stream_hash,
         self.session.peer_finder,
         self.session.rate_limiter,
         self.session.blob_manager,
         self.stream_info_manager,
         self,
         payment_rate_manager,
         self.session.wallet,
         download_directory,
         sd_hash=sd_hash,
         key=key,
         stream_name=stream_name,
         suggested_file_name=suggested_file_name)
Esempio n. 3
0
 def _get_lbry_file(self,
                    rowid,
                    stream_hash,
                    payment_rate_manager,
                    sd_hash,
                    key,
                    stream_name,
                    file_name,
                    download_directory,
                    suggested_file_name,
                    download_mirrors=None):
     return ManagedEncryptedFileDownloader(
         rowid,
         stream_hash,
         self.peer_finder,
         self.rate_limiter,
         self.blob_manager,
         self.storage,
         self,
         payment_rate_manager,
         self.wallet,
         download_directory,
         file_name,
         stream_name=stream_name,
         sd_hash=sd_hash,
         key=key,
         suggested_file_name=suggested_file_name,
         download_mirrors=download_mirrors)