From 6fd5adbb1dd768d68c9fffde0432adb62a61f15c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 9 Oct 2012 19:10:46 +0200 Subject: [PATCH] dont fail for clips < 1 frame --- pandora/clip/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index 37a7c9b9..1298c91e 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -17,7 +17,7 @@ class MetaClip: start = min(self.start, self.item.sort.duration) end = min(self.end, self.item.sort.duration) self.duration = end - start - if self.duration > 0: + if int(end*25) - int(start*25): self.hue, self.saturation, self.lightness = extract.average_color( self.item.timeline_prefix, self.start, self.end) self.volume = extract.average_volume(self.item.timeline_prefix, self.start, self.end)