mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:53:29 +02:00
...
This commit is contained in:
parent
d38d282489
commit
a2e76a5993
1 changed files with 3 additions and 8 deletions
|
|
@ -14,6 +14,7 @@
|
|||
from calibre.db.locking import create_locks, RecordLock
|
||||
from calibre.db.fields import create_field
|
||||
from calibre.db.tables import VirtualTable
|
||||
from calibre.db.lazy import FormatMetadata, FormatsList
|
||||
from calibre.ebooks.metadata.book.base import Metadata
|
||||
from calibre.utils.date import now
|
||||
|
||||
|
|
@ -127,14 +128,8 @@ def _get_metadata(self, book_id, get_user_categories=True): # {{{
|
|||
if not formats:
|
||||
good_formats = None
|
||||
else:
|
||||
good_formats = []
|
||||
for f in formats:
|
||||
try:
|
||||
mi.format_metadata[f] = self._format_metadata(book_id, f)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
good_formats.append(f)
|
||||
mi.format_metadata = FormatMetadata(self, id, formats)
|
||||
good_formats = FormatsList(formats, mi.format_metadata)
|
||||
mi.formats = good_formats
|
||||
mi.has_cover = _('Yes') if self._field_for('cover', book_id,
|
||||
default_value=False) else ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue