mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-09-01 01:35:14 +00:00
add force option to resolve
This commit is contained in:
parent
da6858f1c3
commit
7ac88ea3ea
1 changed files with 3 additions and 2 deletions
|
@ -1410,12 +1410,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def jsonrpc_resolve(self, uri):
|
def jsonrpc_resolve(self, uri, force=False):
|
||||||
"""
|
"""
|
||||||
Resolve a LBRY URI
|
Resolve a LBRY URI
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
'uri': (str) uri to download
|
'uri': (str) uri to download
|
||||||
|
'force'(optional): (boolean) set to true to ignore cache and force refresh
|
||||||
Returns:
|
Returns:
|
||||||
None if nothing can be resolved, otherwise:
|
None if nothing can be resolved, otherwise:
|
||||||
If uri resolves to a channel or a claim in a channel:
|
If uri resolves to a channel or a claim in a channel:
|
||||||
|
@ -1485,7 +1486,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resolved = yield self.session.wallet.resolve_uri(uri)
|
resolved = yield self.session.wallet.resolve_uri(uri, check_cache=not force)
|
||||||
except Exception:
|
except Exception:
|
||||||
resolved = None
|
resolved = None
|
||||||
results = yield self._render_response(resolved)
|
results = yield self._render_response(resolved)
|
||||||
|
|
Loading…
Add table
Reference in a new issue