diff --git a/CHANGELOG.md b/CHANGELOG.md index 72dd4428c..80d5675dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ at anytime. * ### Added - * + * `blob_reflect` command to send specific blobs to a reflector server * ### Removed diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index c5e7d0e22..d83f0a118 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -3074,6 +3074,24 @@ class Daemon(AuthJSONRPCServer): response = yield self._render_response(blob_hashes_for_return) defer.returnValue(response) + def jsonrpc_blob_reflect(self, blob_hashes, reflector_server=None): + """ + Reflects specified blobs + + Usage: + blob_reflect (...) [--reflector_server=] + + Options: + --reflector_server= (str) : reflector address + + Returns: + (list) reflected blob hashes + """ + + d = reupload.reflect_blob_hashes(blob_hashes, self.session.blob_manager, reflector_server) + d.addCallback(lambda r: self._render_response(r)) + return d + def jsonrpc_blob_reflect_all(self): """ Reflects all saved blobs