From f4703ae9cdea5a2c5697444c0610dbee105f35dc Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 2 Jan 2014 11:17:59 -0600 Subject: [PATCH] Don't fail transcoding if we fail to generate a thumbnail. This patch by Sergio Durigan Junior. Thank you, Sergio! --- AUTHORS | 1 + mediagoblin/media_types/video/processing.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index d1b082e0..2b2bb48a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -82,6 +82,7 @@ Thank you! * Tran Thanh Bao * Tryggvi Björgvinsson * Shawn Khan +* Sergio Durigan Junior * Will Kahn-Greene Special thanks to: diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index eb5a062c..abd5f36e 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -266,6 +266,11 @@ class CommonVideoProcessor(MediaProcessor): tmp_thumb, 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 _log.debug('Saving thumbnail...') store_public(self.entry, 'thumb', tmp_thumb, -- 2.25.1