From 2dafa291845e380c7a1b00bb098b82d944b90961 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 29 Jan 2011 12:30:12 +0000 Subject: [PATCH] 1) restore: provide OPF with the path to the folder containing the OPF file. Make the cover path be correct. 2) check_library.py: change the wording of the cover messages. --- src/calibre/library/check_library.py | 4 ++-- src/calibre/library/restore.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/library/check_library.py b/src/calibre/library/check_library.py index b49330db3e..19ecb97308 100644 --- a/src/calibre/library/check_library.py +++ b/src/calibre/library/check_library.py @@ -30,8 +30,8 @@ CHECKS = [('invalid_titles', _('Invalid titles'), True, False), ('missing_formats', _('Missing book formats'), False, False), ('extra_formats', _('Extra book formats'), True, False), ('extra_files', _('Unknown files in books'), True, False), - ('missing_covers', _('Missing covers in books'), False, True), - ('extra_covers', _('Extra covers in books'), True, True), + ('missing_covers', _('Missing covers files'), False, True), + ('extra_covers', _('Cover files not in database'), True, True), ('failed_folders', _('Folders raising exception'), False, False) ] diff --git a/src/calibre/library/restore.py b/src/calibre/library/restore.py index bc2c740279..76f3c0333d 100644 --- a/src/calibre/library/restore.py +++ b/src/calibre/library/restore.py @@ -141,7 +141,7 @@ class Restore(Thread): sizes = [os.path.getsize(os.path.join(dirpath, x)) for x in formats] names = [os.path.splitext(x)[0] for x in formats] opf = os.path.join(dirpath, 'metadata.opf') - mi = OPF(opf).to_book_metadata() + mi = OPF(opf, basedir=dirpath).to_book_metadata() timestamp = os.path.getmtime(opf) path = os.path.relpath(dirpath, self.src_library_path).replace(os.sep, '/')