migration fix

This commit is contained in:
Lex Berezhny 2019-01-08 17:22:17 -05:00
parent 0613cf2d59
commit 33392b3351

View file

@ -2,6 +2,7 @@ import sqlite3
import os import os
import json import json
import logging import logging
from binascii import hexlify
from lbrynet import conf from lbrynet import conf
from lbrynet.schema.decode import smart_decode from lbrynet.schema.decode import smart_decode
@ -188,7 +189,7 @@ def do_migration(db_dir):
# insert the file # insert the file
transaction.execute( transaction.execute(
"insert or ignore into file values (?, ?, ?, ?, ?)", "insert or ignore into file values (?, ?, ?, ?, ?)",
(stream_hash, stream_name, conf.settings.download_dir.encode('hex'), (stream_hash, stream_name, hexlify(conf.settings.download_dir),
data_rate, status) data_rate, status)
) )