more work to fix tests
This commit is contained in:
parent
1e4b5cb450
commit
d16b3429cd
1 changed files with 9 additions and 9 deletions
|
@ -12,7 +12,7 @@ from lbrynet.interfaces import IStreamDownloaderFactory
|
|||
from lbrynet.lbrylive.StreamDescriptor import LiveStreamType
|
||||
|
||||
|
||||
class LiveStreamDownloader(CryptStreamDownloader):
|
||||
class _LiveStreamDownloader(CryptStreamDownloader):
|
||||
|
||||
def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager, stream_info_manager,
|
||||
payment_rate_manager, wallet, upload_allowed):
|
||||
|
@ -39,10 +39,10 @@ class LiveStreamDownloader(CryptStreamDownloader):
|
|||
return defer.succeed(True)
|
||||
|
||||
|
||||
class LiveStreamDownloader(LiveStreamDownloader):
|
||||
class LiveStreamDownloader(_LiveStreamDownloader):
|
||||
def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager, stream_info_manager,
|
||||
payment_rate_manager, wallet, upload_allowed):
|
||||
LiveStreamDownloader.__init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
|
||||
_LiveStreamDownloader.__init__(self, stream_hash, peer_finder, rate_limiter, blob_manager,
|
||||
stream_info_manager, payment_rate_manager, wallet, upload_allowed)
|
||||
|
||||
#self.writer = process.ProcessWriter(reactor, self, 'write', 1)
|
||||
|
@ -65,17 +65,17 @@ class LiveStreamDownloader(LiveStreamDownloader):
|
|||
return write_func
|
||||
|
||||
|
||||
class FullLiveStreamDownloader(LiveStreamDownloader):
|
||||
class FullLiveStreamDownloader(_LiveStreamDownloader):
|
||||
def __init__(self, stream_hash, peer_finder, rate_limiter, blob_manager, stream_info_manager,
|
||||
payment_rate_manager, wallet, upload_allowed):
|
||||
LiveStreamDownloader.__init__(self, stream_hash, peer_finder, rate_limiter,
|
||||
_LiveStreamDownloader.__init__(self, stream_hash, peer_finder, rate_limiter,
|
||||
blob_manager, stream_info_manager, payment_rate_manager,
|
||||
wallet, upload_allowed)
|
||||
self.file_handle = None
|
||||
self.file_name = None
|
||||
|
||||
def set_stream_info(self):
|
||||
d = LiveStreamDownloader.set_stream_info(self)
|
||||
d = _LiveStreamDownloader.set_stream_info(self)
|
||||
|
||||
def set_file_name_if_unset():
|
||||
if not self.file_name:
|
||||
|
@ -88,7 +88,7 @@ class FullLiveStreamDownloader(LiveStreamDownloader):
|
|||
|
||||
def stop(self, err=None):
|
||||
d = self._close_file()
|
||||
d.addBoth(lambda _: LiveStreamDownloader.stop(self, err))
|
||||
d.addBoth(lambda _: _LiveStreamDownloader.stop(self, err))
|
||||
return d
|
||||
|
||||
def _start(self):
|
||||
|
@ -96,7 +96,7 @@ class FullLiveStreamDownloader(LiveStreamDownloader):
|
|||
d = self._open_file()
|
||||
else:
|
||||
d = defer.succeed(True)
|
||||
d.addCallback(lambda _: LiveStreamDownloader._start(self))
|
||||
d.addCallback(lambda _: _LiveStreamDownloader._start(self))
|
||||
return d
|
||||
|
||||
def _open_file(self):
|
||||
|
@ -179,4 +179,4 @@ def add_full_live_stream_downloader_to_sd_identifier(session, stream_info_manage
|
|||
stream_info_manager,
|
||||
session.wallet,
|
||||
base_live_stream_payment_rate_manager)
|
||||
sd_identifier.add_stream_downloader_factory(LiveStreamType, downloader_factory)
|
||||
sd_identifier.add_stream_downloader_factory(LiveStreamType, downloader_factory)
|
||||
|
|
Loading…
Reference in a new issue