From f244476138ab744fe1c8ca6e85d1a4a5c3c6838a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 16 Sep 2014 08:52:46 +0000 Subject: [PATCH] dont fail for clips without color --- 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 672bd00a..384a465e 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1279,7 +1279,7 @@ class Item(models.Model): n = streams.count() for s in streams: self.data['volume'] += s.volume * s.duration - color = map(lambda a,b: (a+b)/n, color,ox.image.getRGB(s.color)) + color = map(lambda a,b: (a+b)/n, color, ox.image.getRGB(s.color or [0.0] * 3)) offset += s.duration self.data['hue'], self.data['saturation'], self.data['lightness'] = ox.image.getHSL(color) if offset: