Merge pull request #2105 from lbryio/fix-store-content-fee

fix store content fee
This commit is contained in:
Jack Robison 2019-05-09 18:47:30 -04:00 committed by GitHub
commit 1e54271d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,7 +204,7 @@ def store_file(transaction: sqlite3.Connection, stream_hash: str, file_name: typ
"insert or replace into file values (?, ?, ?, ?, ?, ?, ?)",
(stream_hash, encoded_file_name, encoded_download_dir, data_payment_rate, status,
1 if (file_name and download_directory and os.path.isfile(os.path.join(download_directory, file_name))) else 0,
None if not content_fee else content_fee.raw.decode())
None if not content_fee else binascii.hexlify(content_fee.raw).decode())
)
return transaction.execute("select rowid from file where stream_hash=?", (stream_hash, )).fetchone()[0]