From bb2cc3ff1650ffb032e8c259b3e988c3502a9fe1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 26 Mar 2013 14:09:14 +0000 Subject: [PATCH] only offer existing posterframes --- pandora/item/models.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 5acbd7951..78750a355 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1225,12 +1225,14 @@ class Item(models.Model): width, height = self.json['resolution'] pos = self.sort.duration / 2 for p in map(int, [pos/2, pos, pos+pos/2]): - frames.append({ - 'position': p, - 'path': self.frame(p, height), - 'width': width, - 'height': height, - }) + path = self.frame(p, height) + if path: + frames.append({ + 'position': p, + 'path': path, + 'width': width, + 'height': height, + }) return frames def select_frame(self):