From d1240541c896b58b216edba0e283b2c91e7e8509 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 27 Feb 2018 16:32:21 -0500 Subject: [PATCH] always update lbry file attributes after publishing --- lbrynet/daemon/Daemon.py | 1 + lbrynet/daemon/Publisher.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index b461802f9..0ac782298 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -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']) diff --git a/lbrynet/daemon/Publisher.py b/lbrynet/daemon/Publisher.py index c1354fd91..da565db44 100644 --- a/lbrynet/daemon/Publisher.py +++ b/lbrynet/daemon/Publisher.py @@ -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