forked from 0x2620/pandora
0xdb poster script: only add frames if duration exists
This commit is contained in:
parent
a53d41d1af
commit
882de2a13a
1 changed files with 15 additions and 14 deletions
|
@ -84,6 +84,7 @@ def render_poster(data, poster):
|
|||
poster_image.putpixel((margin + x, margin + y), color)
|
||||
|
||||
# small frames
|
||||
if duration:
|
||||
for i in range(small_frames):
|
||||
position = duration * (i + 1) / (small_frames + 1)
|
||||
small_frame_url = 'https://0xdb.org/%s/96p%f.jpg' % (id, round(position * 25) / 25)
|
||||
|
|
Loading…
Reference in a new issue