From f9835e934d7345aba8ef7dd99b5e497220fc87a2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 5 Oct 2011 23:20:43 +0200 Subject: [PATCH] dont fail if position to high --- pandora/item/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 32cf7656d..81adf6dd3 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -580,7 +580,7 @@ def frame(request, id, size, position=None): frames = item.poster_frames() if frames: position = item.poster_frame - if position == -1: + if position == -1 or position > len(frames): position = int(len(frames)/2) position = frames[int(position)]['position'] elif item.poster_frame == -1 and item.sort.duration: