Don't fail transcoding if we fail to generate a thumbnail.

This patch by Sergio Durigan Junior.  Thank you, Sergio!
This commit is contained in:
Christopher Allan Webber 2014-01-02 11:17:59 -06:00
parent f7f38fb047
commit f4703ae9cd
2 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,7 @@ Thank you!
* Tran Thanh Bao * Tran Thanh Bao
* Tryggvi Björgvinsson * Tryggvi Björgvinsson
* Shawn Khan * Shawn Khan
* Sergio Durigan Junior
* Will Kahn-Greene * Will Kahn-Greene
Special thanks to: Special thanks to:

View File

@ -266,6 +266,11 @@ class CommonVideoProcessor(MediaProcessor):
tmp_thumb, tmp_thumb,
thumb_size[0]) thumb_size[0])
# Checking if the thumbnail was correctly created. If it was not,
# then just give up.
if not os.path.exists (tmp_thumb):
return
# Push the thumbnail to public storage # Push the thumbnail to public storage
_log.debug('Saving thumbnail...') _log.debug('Saving thumbnail...')
store_public(self.entry, 'thumb', tmp_thumb, store_public(self.entry, 'thumb', tmp_thumb,