diff --git a/CHANGELOG.md b/CHANGELOG.md index 50db405b7..b178ee6ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,8 +15,8 @@ at anytime. ### Changed * Use `uri` instead of `name` in `get_availability` - * - * + * Add `channel_name` to claim and file responses where applicable + * Return None (instead of errors) if a uri cannot be resolved ### Fixed * `file_list` for files with bad signatures diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index a1674051a..f52f8ca6a 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -918,6 +918,12 @@ class Daemon(AuthJSONRPCServer): metadata = claim['value'] else: metadata = None + + if claim and 'channel_name' in claim: + channel_name = claim['channel_name'] + else: + channel_name = None + if lbry_file.txid and lbry_file.nout is not None: outpoint = repr(ClaimOutpoint(lbry_file.txid, lbry_file.nout)) else: @@ -943,6 +949,7 @@ class Daemon(AuthJSONRPCServer): 'suggested_file_name': lbry_file.suggested_file_name, 'sd_hash': lbry_file.sd_hash, 'name': lbry_file.name, + 'channel_name': channel_name, 'outpoint': outpoint, 'claim_id': lbry_file.claim_id, 'download_path': full_path, @@ -1444,7 +1451,10 @@ class Daemon(AuthJSONRPCServer): } """ - resolved = yield self.session.wallet.resolve_uri(uri) + try: + resolved = yield self.session.wallet.resolve_uri(uri) + except Exception: + resolved = None results = yield self._render_response(resolved) defer.returnValue(results) diff --git a/setup.py b/setup.py index 97fafee2a..a5e1e8413 100644 --- a/setup.py +++ b/setup.py @@ -19,8 +19,8 @@ requires = [ 'envparse', 'jsonrpc', 'jsonschema', - 'lbryum>=2.7.16', - 'lbryschema>=0.0.2', + 'lbryum==2.7.17', + 'lbryschema==0.0.2', 'miniupnpc', 'pycrypto', 'pyyaml',