mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fixes for thumbnails.
This commit is contained in:
parent
6ca5263d00
commit
8b554ee0cd
@ -110,7 +110,7 @@ COPYABLE_METADATA_FIELDS = SOCIAL_METADATA_FIELDS.union(
|
|||||||
frozenset(['title', 'title_sort', 'authors',
|
frozenset(['title', 'title_sort', 'authors',
|
||||||
'author_sort', 'author_sort_map' 'comments',
|
'author_sort', 'author_sort_map' 'comments',
|
||||||
'cover_data', 'tags', 'language', 'lpath',
|
'cover_data', 'tags', 'language', 'lpath',
|
||||||
'size'])
|
'size', 'thumbnail'])
|
||||||
|
|
||||||
SERIALIZABLE_FIELDS = SOCIAL_METADATA_FIELDS.union(
|
SERIALIZABLE_FIELDS = SOCIAL_METADATA_FIELDS.union(
|
||||||
USER_METADATA_FIELDS).union(
|
USER_METADATA_FIELDS).union(
|
||||||
|
@ -223,7 +223,7 @@ class Metadata(object):
|
|||||||
self.author_sort = other.author_sort
|
self.author_sort = other.author_sort
|
||||||
|
|
||||||
if replace_metadata:
|
if replace_metadata:
|
||||||
SPECIAL_FIELDS = frozenset(['lpath', 'size', 'comments'])
|
SPECIAL_FIELDS = frozenset(['lpath', 'size', 'comments', 'thumbnail'])
|
||||||
for attr in COPYABLE_METADATA_FIELDS:
|
for attr in COPYABLE_METADATA_FIELDS:
|
||||||
setattr(self, attr, getattr(other, attr, 1.0 if \
|
setattr(self, attr, getattr(other, attr, 1.0 if \
|
||||||
attr == 'series_index' else None))
|
attr == 'series_index' else None))
|
||||||
@ -238,6 +238,7 @@ class Metadata(object):
|
|||||||
for attr in COPYABLE_METADATA_FIELDS:
|
for attr in COPYABLE_METADATA_FIELDS:
|
||||||
if hasattr(other, attr):
|
if hasattr(other, attr):
|
||||||
copy_not_none(self, other, attr)
|
copy_not_none(self, other, attr)
|
||||||
|
copy_not_none(self, other, 'thumbnail')
|
||||||
if other.tags:
|
if other.tags:
|
||||||
# Case-insensitive but case preserving merging
|
# Case-insensitive but case preserving merging
|
||||||
lotags = [t.lower() for t in other.tags]
|
lotags = [t.lower() for t in other.tags]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user