Take out debugging return from cli restore_db

Add restore UUID to recover.py
This commit is contained in:
Charles Haley 2010-10-08 17:55:02 +01:00
parent 7fb8f74c16
commit bdfb1cf643
2 changed files with 2 additions and 1 deletions

View File

@ -989,7 +989,6 @@ def command_restore_database(args, dbpath):
parser.print_help() parser.print_help()
return 1 return 1
return
if opts.library_path is not None: if opts.library_path is not None:
dbpath = opts.library_path dbpath = opts.library_path

View File

@ -200,6 +200,8 @@ class Restore(Thread):
def restore_book(self, book, db): def restore_book(self, book, db):
db.create_book_entry(book['mi'], add_duplicates=True, db.create_book_entry(book['mi'], add_duplicates=True,
force_id=book['id']) force_id=book['id'])
if book['mi'].uuid:
db.set_uuid(book['id'], book['mi'].uuid, commit=False, notify=False)
db.conn.execute('UPDATE books SET path=? WHERE id=?', (book['path'], db.conn.execute('UPDATE books SET path=? WHERE id=?', (book['path'],
book['id'])) book['id']))