diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 2806b25d5..285956def 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -182,6 +182,7 @@ ENVIRONMENT = Env( # all of your credits. API_INTERFACE=(str, "localhost"), bittrex_feed=(str, "https://bittrex.com/api/v1.1/public/getmarkethistory"), + reflector_reupload=(bool, True), ) diff --git a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py index ff9355e39..91f855e90 100644 --- a/lbrynet/lbryfilemanager/EncryptedFileDownloader.py +++ b/lbrynet/lbryfilemanager/EncryptedFileDownloader.py @@ -74,10 +74,8 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver): d.addCallbacks(_save_claim_id, lambda err: _notify_bad_claim(name, txid, nout)) return d - reflector_server = random.choice(settings.reflector_servers) - d.addCallback(_save_stream_info) - d.addCallback(lambda _: reupload.check_and_restore_availability(self, reflector_server)) + d.addCallback(lambda _: self._reupload()) d.addCallback(lambda _: self.lbry_file_manager.get_lbry_file_status(self)) def restore_status(status): @@ -92,6 +90,12 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver): d.addCallback(restore_status) return d + def _reupload(self): + if not settings.reflector_reupload: + return + reflector_server = random.choice(settings.reflector_servers) + return reupload.check_and_restore_availability(self, reflector_server) + def stop(self, err=None, change_status=True): def set_saving_status_done():