select poster frame

This commit is contained in:
j 2011-08-04 15:28:06 +02:00
commit d75c8fc9da
4 changed files with 141 additions and 7 deletions

View file

@ -560,9 +560,8 @@ def poster_frame(request, id, position):
item = get_object_or_404(models.Item, itemId=id)
position = int(position)
frames = item.poster_frames()
print frames, position
if frames and len(frames) > position:
frame = frames[position]
frame = frames[position]['path']
return HttpFileResponse(frame, content_type='image/jpeg')
raise Http404