migrate configured download directory instead of assuming the default

This commit is contained in:
Jack Robison 2018-03-13 11:40:34 -04:00
parent ed3e825472
commit cde78f8134
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -8,7 +8,7 @@ from lbrynet.database.storage import SQLiteStorage
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
default_download_directory = conf.default_download_dir download_directory = conf.settings['download_directory']
def run_operation(db): def run_operation(db):
@ -129,7 +129,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, default_download_directory.encode('hex'), (stream_hash, stream_name, download_directory.encode('hex'),
data_rate, status) data_rate, status)
) )