Fixing the ascii art media type. There was an ordering issue in the code.

Moved set_file_metadata till after the thumb file was created!

This commit sponsored by Samat Jain.  Thank you!
This commit is contained in:
Christopher Allan Webber 2013-11-08 11:22:48 -06:00
parent 02993c9daa
commit 7ec0a978e0

View File

@ -151,12 +151,13 @@ class CommonAsciiProcessor(MediaProcessor):
'width': thumb_size[0], 'width': thumb_size[0],
'height': thumb_size[1]} 'height': thumb_size[1]}
self.entry.set_file_metadata('thumb', **thumb_info)
_log.debug('Copying local file to public storage') _log.debug('Copying local file to public storage')
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'))
self.entry.set_file_metadata('thumb', **thumb_info)
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')