Improvements to thumbnail generation and detail page

This commit is contained in:
Brett Williams
2022-12-12 21:45:46 -08:00
parent 9ac22a5555
commit 9a9b0304b9
11 changed files with 51 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ import os
import json
import threading
from utilities.render_worker import RenderStatus
from utilities.ffmpeg_presets import generate_fast_preview, save_first_frame
from utilities.ffmpeg_presets import generate_thumbnail, save_first_frame
def post_job_to_server(input_path, job_list, client, server_port=8080):
@@ -22,7 +22,7 @@ def generate_thumbnail_for_job(job, thumb_video_path, thumb_image_path, max_widt
def generate_thumb_thread(source):
in_progress_path = thumb_video_path + '_IN-PROGRESS'
subprocess.run(['touch', in_progress_path])
generate_fast_preview(source_path=source, dest_path=thumb_video_path, max_width=max_width)
generate_thumbnail(source_path=source, dest_path=thumb_video_path, max_width=max_width)
os.remove(in_progress_path)
# Determine best source file to use for thumbs