add metadata to lbry_file
This commit is contained in:
parent
1c507393a9
commit
210c1215d6
1 changed files with 13 additions and 0 deletions
|
@ -1119,9 +1119,22 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
def _add_metadata(message):
|
||||||
|
def _add_to_dict(metadata):
|
||||||
|
message['metadata'] = metadata
|
||||||
|
return defer.succeed(message)
|
||||||
|
|
||||||
|
if f.txid:
|
||||||
|
d = self._resolve_name(f.uri)
|
||||||
|
d.addCallback(_add_to_dict)
|
||||||
|
else:
|
||||||
|
d = defer.succeed(None)
|
||||||
|
return d
|
||||||
|
|
||||||
if f:
|
if f:
|
||||||
d = f.get_total_bytes()
|
d = f.get_total_bytes()
|
||||||
d.addCallback(_generate_reply)
|
d.addCallback(_generate_reply)
|
||||||
|
d.addCallback(_add_metadata)
|
||||||
return d
|
return d
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue