vid-thumbs: suppress ffmpeg stdout, fix vid toggle

Previous behavior on submission_listing was clicking a thumbnail would
toggle an inline video player. This was retained for clicking the
thumbnail off the `.video-play` element; however, directly clicking
the `.video-play` did not have the `toggleVideo` onclick event attached
and would navigate the browser to the video file directly.
pull/58/head
Snakes 2022-12-09 23:02:35 -05:00
parent f94e6f3766
commit 388f1ba3d5
Signed by: Snakes
GPG Key ID: E745A82778055C7E
2 changed files with 4 additions and 2 deletions

View File

@ -5907,6 +5907,7 @@ g {
background-color:var(--primary);
padding:5px 5px 3px 7px;
border-radius:.35rem;
pointer-events: none;
}
/* ------- Font Awesome ------- */
@font-face{

View File

@ -746,8 +746,9 @@ def submit_post(v:User, sub=None):
elif file.content_type.startswith('video/'):
post.url = process_video(file, v)
name = f'/images/{time.time()}'.replace('.','') + '.webp'
# prints a lot of shit in console, pls fix snekdaddy
subprocess.run(['ffmpeg', '-i', post.url, '-vf', '"select=eq(n\,0)"', "-vf", "scale=100:-2", "-q:v", "3", "-frames:v", "1", name], check=True)
subprocess.run(['ffmpeg', '-y', '-loglevel', 'warning',
'-i', post.url, '-vf', '"select=eq(n\,0)"', '-vf',
'scale=100:-2', '-q:v', '3', '-frames:v', '1', name], check=True)
post.thumburl = name
elif file.content_type.startswith('audio/'):
post.url = process_audio(file, v)