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.
This commit is contained in:
Charles Haley 2011-01-29 12:30:12 +00:00
parent 00f0e37bff
commit 2dafa29184
2 changed files with 3 additions and 3 deletions

View File

@ -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)
]

View File

@ -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,
'/')