aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/media_types
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-01-02 11:17:59 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-01-02 11:17:59 -0600
commitf4703ae9cdea5a2c5697444c0610dbee105f35dc (patch)
tree0675cba50ce1e6d7f36c51e9470359017e21f010 /mediagoblin/media_types
parentf7f38fb047059f0289060f2b87a213e2909e1a20 (diff)
downloadmediagoblin-f4703ae9cdea5a2c5697444c0610dbee105f35dc.tar.lz
mediagoblin-f4703ae9cdea5a2c5697444c0610dbee105f35dc.tar.xz
mediagoblin-f4703ae9cdea5a2c5697444c0610dbee105f35dc.zip
Don't fail transcoding if we fail to generate a thumbnail.
This patch by Sergio Durigan Junior. Thank you, Sergio!
Diffstat (limited to 'mediagoblin/media_types')
-rw-r--r--mediagoblin/media_types/video/processing.py5
1 files changed, 5 insertions, 0 deletions
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,