From 98bf50df86a4919b9f9c7a80bddaf7921a0102b8 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 9 Aug 2011 19:35:10 +0200 Subject: [PATCH] check video --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index eefa443f..3defed75 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -701,7 +701,7 @@ class Item(models.Model): height = min(height, stream.height()) path = os.path.join(settings.MEDIA_ROOT, self.path(), 'frames', "%dp"%height, "%s.jpg"%position) - if not os.path.exists(path): + if not os.path.exists(path) and stream.video: extract.frame(stream.video.path, path, position, height) if not os.path.exists(path): path = os.path.join(settings.STATIC_ROOT, 'png/frame.broken.png')