From 0eb873d2cbb60d0dc075cdadae027c24e5687b7a Mon Sep 17 00:00:00 2001 From: j Date: Mon, 15 Aug 2016 15:14:44 +0200 Subject: [PATCH] fix hue, saturation, lightness calculation for multi part items --- 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 ad3f991f..91aa6a8c 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1335,7 +1335,7 @@ class Item(models.Model): n = streams.count() for s in streams: self.data['volume'] += s.volume * s.duration - color = [(a+b)/n for a, b in zip(color, ox.image.getRGB([1.0] * 3))] + color = [(a+b)/n for a, b in zip(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: