order poster frames, fixes #409

This commit is contained in:
j 2012-03-09 22:08:17 +01:00
parent 1b05226103
commit 5c439828ea

View file

@ -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,