mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-31 17:31:29 +00:00
always update lbry file attributes after publishing
This commit is contained in:
parent
91229aac6e
commit
d1240541c8
2 changed files with 2 additions and 1 deletions
|
@ -722,6 +722,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
d = reupload.reflect_stream(publisher.lbry_file)
|
d = reupload.reflect_stream(publisher.lbry_file)
|
||||||
d.addCallbacks(lambda _: log.info("Reflected new publication to lbry://%s", name),
|
d.addCallbacks(lambda _: log.info("Reflected new publication to lbry://%s", name),
|
||||||
log.exception)
|
log.exception)
|
||||||
|
yield publisher.lbry_file.get_claim_info()
|
||||||
self.analytics_manager.send_claim_action('publish')
|
self.analytics_manager.send_claim_action('publish')
|
||||||
log.info("Success! Published to lbry://%s txid: %s nout: %d", name, claim_out['txid'],
|
log.info("Success! Published to lbry://%s txid: %s nout: %d", name, claim_out['txid'],
|
||||||
claim_out['nout'])
|
claim_out['nout'])
|
||||||
|
|
|
@ -55,7 +55,6 @@ class Publisher(object):
|
||||||
yield self.session.storage.save_content_claim(
|
yield self.session.storage.save_content_claim(
|
||||||
self.lbry_file.stream_hash, "%s:%i" % (claim_out['txid'], claim_out['nout'])
|
self.lbry_file.stream_hash, "%s:%i" % (claim_out['txid'], claim_out['nout'])
|
||||||
)
|
)
|
||||||
yield self.lbry_file.get_claim_info()
|
|
||||||
defer.returnValue(claim_out)
|
defer.returnValue(claim_out)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -63,6 +62,7 @@ class Publisher(object):
|
||||||
"""Make a claim without creating a lbry file"""
|
"""Make a claim without creating a lbry file"""
|
||||||
claim_out = yield self.make_claim(name, bid, claim_dict, claim_address, change_address)
|
claim_out = yield self.make_claim(name, bid, claim_dict, claim_address, change_address)
|
||||||
yield self.session.storage.save_content_claim(stream_hash, "%s:%i" % (claim_out['txid'], claim_out['nout']))
|
yield self.session.storage.save_content_claim(stream_hash, "%s:%i" % (claim_out['txid'], claim_out['nout']))
|
||||||
|
self.lbry_file = [f for f in self.lbry_file_manager.lbry_files if f.stream_hash == stream_hash][0]
|
||||||
defer.returnValue(claim_out)
|
defer.returnValue(claim_out)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Add table
Reference in a new issue