Fixes for thumbnails.

This commit is contained in:
Charles Haley 2010-09-12 22:04:10 +01:00
parent 6ca5263d00
commit 8b554ee0cd
2 changed files with 3 additions and 2 deletions

View File

@ -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(

View File

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