forked from rDrama/rDrama
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.master
parent
37cedaee9f
commit
f06da51288
|
@ -5907,6 +5907,7 @@ g {
|
||||||
background-color:var(--primary);
|
background-color:var(--primary);
|
||||||
padding:5px 5px 3px 7px;
|
padding:5px 5px 3px 7px;
|
||||||
border-radius:.35rem;
|
border-radius:.35rem;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
/* ------- Font Awesome ------- */
|
/* ------- Font Awesome ------- */
|
||||||
@font-face{
|
@font-face{
|
||||||
|
|
|
@ -746,8 +746,9 @@ def submit_post(v:User, sub=None):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
post.url = process_video(file, v)
|
post.url = process_video(file, v)
|
||||||
name = f'/images/{time.time()}'.replace('.','') + '.webp'
|
name = f'/images/{time.time()}'.replace('.','') + '.webp'
|
||||||
# prints a lot of shit in console, pls fix snekdaddy
|
subprocess.run(['ffmpeg', '-y', '-loglevel', 'warning',
|
||||||
subprocess.run(['ffmpeg', '-i', post.url, '-vf', '"select=eq(n\,0)"', "-vf", "scale=100:-2", "-q:v", "3", "-frames:v", "1", name], check=True)
|
'-i', post.url, '-vf', '"select=eq(n\,0)"', '-vf',
|
||||||
|
'scale=100:-2', '-q:v', '3', '-frames:v', '1', name], check=True)
|
||||||
post.thumburl = name
|
post.thumburl = name
|
||||||
elif file.content_type.startswith('audio/'):
|
elif file.content_type.startswith('audio/'):
|
||||||
post.url = process_audio(file, v)
|
post.url = process_audio(file, v)
|
||||||
|
|
Loading…
Reference in New Issue