From 5c439828ea446ead3e1bcc558a68ec4b49fa4f1a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 9 Mar 2012 22:08:17 +0100 Subject: [PATCH] order poster frames, fixes #409 --- pandora/item/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index e2f44df8a..b893b20b6 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1139,8 +1139,8 @@ class Item(models.Model): def poster_frames(self): frames = [] offset = 0 - for f in self.files.filter(selected=True, is_video=True): - for ff in f.frames.all(): + for f in self.files.filter(selected=True, is_video=True).order_by('part'): + for ff in f.frames.all().order_by('position'): frames.append({ 'position': offset + ff.position, 'path': ff.frame.path,