From e27e49e9dc637c1ee5dd6ca4da7cc2156d9c79bb Mon Sep 17 00:00:00 2001
From: Victor Shyba <victor.shyba@gmail.com>
Date: Wed, 10 Mar 2021 19:13:32 -0300
Subject: [PATCH] call update only once

---
 lbry/extras/daemon/daemon.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py
index 48a97b2c6..73f0388c1 100644
--- a/lbry/extras/daemon/daemon.py
+++ b/lbry/extras/daemon/daemon.py
@@ -3288,19 +3288,19 @@ class Daemon(metaclass=JSONRPCServerType):
             kwargs.update(spec)
 
         claim = Claim()
-        claim.stream.update(**kwargs)
         if file_path is not None:
-            claim.stream.update(file_path=file_path, sd_hash='0' * 96)
+            claim.stream.update(file_path=file_path, sd_hash='0' * 96, **kwargs)
+        else:
+            claim.stream.update(**kwargs)
         tx = await Transaction.claim_create(
             name, claim, amount, claim_address, funding_accounts, funding_accounts[0], channel
         )
         new_txo = tx.outputs[0]
 
         file_stream = None
-        if not preview:
-            if file_path is not None:
-                file_stream = await self.file_manager.create_stream(file_path)
-                claim.stream.source.sd_hash = file_stream.sd_hash
+        if not preview and file_path is not None:
+            file_stream = await self.file_manager.create_stream(file_path)
+            claim.stream.source.sd_hash = file_stream.sd_hash
             new_txo.script.generate()
 
         if channel: