use frame as thumbnail, fix default frame.
This commit is contained in:
parent
cce51fa4db
commit
34be7923a7
3 changed files with 14 additions and 14 deletions
|
|
@ -700,14 +700,15 @@ def frame(request, id, size, position=None):
|
|||
return HttpResponseForbidden()
|
||||
frame = None
|
||||
if not position:
|
||||
frames = item.poster_frames()
|
||||
if frames:
|
||||
position = item.poster_frame
|
||||
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:
|
||||
position = item.sort.duration/2
|
||||
if settings.CONFIG['media']['importFrames'] or item.poster_frame == -1:
|
||||
frames = item.poster_frames()
|
||||
if frames:
|
||||
position = item.poster_frame
|
||||
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:
|
||||
position = item.sort.duration/2
|
||||
else:
|
||||
position = item.poster_frame
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue