always update lbry file attributes after publishing

This commit is contained in:
Jack Robison 2018-02-27 16:32:21 -05:00
parent 91229aac6e
commit d1240541c8
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 2 additions and 1 deletions

View file

@ -722,6 +722,7 @@ class Daemon(AuthJSONRPCServer):
d = reupload.reflect_stream(publisher.lbry_file)
d.addCallbacks(lambda _: log.info("Reflected new publication to lbry://%s", name),
log.exception)
yield publisher.lbry_file.get_claim_info()
self.analytics_manager.send_claim_action('publish')
log.info("Success! Published to lbry://%s txid: %s nout: %d", name, claim_out['txid'],
claim_out['nout'])

View file

@ -55,7 +55,6 @@ class Publisher(object):
yield self.session.storage.save_content_claim(
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.inlineCallbacks
@ -63,6 +62,7 @@ class Publisher(object):
"""Make a claim without creating a lbry file"""
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']))
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.inlineCallbacks