skip ascii thumb resizing if necessary
This commit is contained in:
parent
b643a9cd80
commit
755b6a86b6
@ -157,22 +157,22 @@ class CommonAsciiProcessor(MediaProcessor):
|
|||||||
store_public(self.entry, 'thumb', tmp_thumb,
|
store_public(self.entry, 'thumb', tmp_thumb,
|
||||||
self.name_builder.fill('{basename}.thumbnail.jpg'))
|
self.name_builder.fill('{basename}.thumbnail.jpg'))
|
||||||
|
|
||||||
def _skip_resizing(self, font, thumb_size):
|
def _skip_resizing(self, font, thumb_size):
|
||||||
thumb_info = self.entry.get_file_metadata('thumb')
|
thumb_info = self.entry.get_file_metadata('thumb')
|
||||||
|
|
||||||
if not thumb_info:
|
if not thumb_info:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
skip = True
|
skip = True
|
||||||
|
|
||||||
if thumb_info.get('font') != font:
|
if thumb_info.get('font') != font:
|
||||||
skip = False
|
skip = False
|
||||||
elif thumb_info.get('width') != thumb_size[0]:
|
elif thumb_info.get('width') != thumb_size[0]:
|
||||||
skip = False
|
skip = False
|
||||||
elif thumb_info.get('height') != thumb_size[1]:
|
elif thumb_info.get('height') != thumb_size[1]:
|
||||||
skip = False
|
skip = False
|
||||||
|
|
||||||
return skip
|
return skip
|
||||||
|
|
||||||
|
|
||||||
class InitialProcessor(CommonAsciiProcessor):
|
class InitialProcessor(CommonAsciiProcessor):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user