Exemplo n.º 1
0
 def verify_stream_descriptor_file(stream_hash):
     d = lbryfile.get_sd_info(
         self.lbry_file_manager.stream_info_manager, stream_hash, True)
     d.addCallback(verify_equal)
     d.addCallback(lambda _: lbryfile.publish_sd_blob(
         self.lbry_file_manager.stream_info_manager, self.session.
         blob_manager, stream_hash))
     d.addCallback(save_sd_blob_hash)
     d.addCallback(lambda _: stream_hash)
     return d
Exemplo n.º 2
0
 def create_stream():
     test_file = GenFile(
         53209343, b''.join([chr(i + 5) for i in xrange(0, 64, 6)]))
     stream_hash = yield create_lbry_file(
         self.session,
         self.lbry_file_manager,
         "test_file",
         test_file,
         suggested_file_name="test_file")
     yield publish_sd_blob(self.stream_info_manager,
                           self.session.blob_manager, stream_hash)
     defer.returnValue(stream_hash)
Exemplo n.º 3
0
 def verify_stream_descriptor_file(stream_hash):
     d = lbryfile.get_sd_info(self.lbry_file_manager.stream_info_manager, stream_hash, True)
     d.addCallback(verify_equal)
     d.addCallback(
         lambda _: lbryfile.publish_sd_blob(
             self.lbry_file_manager.stream_info_manager,
             self.session.blob_manager, stream_hash
         )
     )
     d.addCallback(save_sd_blob_hash)
     d.addCallback(lambda _: stream_hash)
     return d