Ejemplo n.º 1
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager, stream_info_manager,
              payment_rate_manager, wallet, upload_allowed):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter, blob_manager,
                                    payment_rate_manager, wallet, upload_allowed)
     self.stream_hash = stream_hash
     self.stream_info_manager = stream_info_manager
     self.public_key = None
Ejemplo n.º 2
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager, stream_info_manager,
              payment_rate_manager, wallet, upload_allowed):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter, blob_manager,
                                    payment_rate_manager, wallet, upload_allowed)
     self.stream_hash = stream_hash
     self.stream_info_manager = stream_info_manager
     self.public_key = None
Ejemplo n.º 3
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
              stream_info_manager, payment_rate_manager, wallet):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter, blob_manager,
                                    payment_rate_manager, wallet)
     self.stream_hash = stream_hash
     self.stream_info_manager = stream_info_manager
     self.suggested_file_name = None
     self._calculated_total_bytes = None
Ejemplo n.º 4
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
              stream_info_manager, payment_rate_manager, wallet, upload_allowed):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter, blob_manager,
                                    payment_rate_manager, wallet, upload_allowed)
     self.stream_hash = stream_hash
     self.stream_info_manager = stream_info_manager
     self.suggested_file_name = None
     self._calculated_total_bytes = None
Ejemplo n.º 5
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
              stream_info_manager, payment_rate_manager, wallet, key, stream_name,
              suggested_file_name=None):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter, blob_manager,
                                    payment_rate_manager, wallet, key, stream_name)
     self.stream_hash = stream_hash
     self.stream_info_manager = stream_info_manager
     self.suggested_file_name = binascii.unhexlify(suggested_file_name)
     self._calculated_total_bytes = None
Ejemplo n.º 6
0
 def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
              storage, payment_rate_manager, wallet, key, stream_name,
              file_name):
     CryptStreamDownloader.__init__(self, peer_finder, rate_limiter,
                                    blob_manager, payment_rate_manager,
                                    wallet, key, stream_name)
     self.stream_hash = stream_hash
     self.storage = storage
     self.file_name = binascii.unhexlify(os.path.basename(file_name))
     self._calculated_total_bytes = None
Ejemplo n.º 7
0
 def _start(self):
     d = self._setup_output()
     d.addCallback(lambda _: CryptStreamDownloader._start(self))
     return d
Ejemplo n.º 8
0
 def stop(self, err=None):
     d = self._close_output()
     d.addCallback(lambda _: CryptStreamDownloader.stop(self, err=err))
     return d
Ejemplo n.º 9
0
 def _start(self):
     d = self._setup_output()
     d.addCallback(lambda _: CryptStreamDownloader._start(self))
     return d
Ejemplo n.º 10
0
 def stop(self, err=None):
     d = self._close_output()
     d.addCallback(lambda _: CryptStreamDownloader.stop(self, err=err))
     return d