mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Improved handling of creating job JSONs as well as better handle loading saved JSONs
This commit is contained in:
@@ -33,10 +33,11 @@ def generate_thumbnail_for_job(job, thumb_video_path, thumb_image_path, max_widt
|
||||
else:
|
||||
source_path = [job.worker.input_path] # use source if nothing else
|
||||
|
||||
# Todo: convert image sequence to animated movie
|
||||
valid_formats = ['.mp4', '.mov', '.avi', '.mpg', '.mpeg', '.jpg', '.png', '.exr', '.mxf']
|
||||
is_valid_file_type = any(ele in source_path[0] for ele in valid_formats)
|
||||
if is_valid_file_type and not os.path.exists(thumb_video_path):
|
||||
save_first_frame(source_path=source_path[0], dest_path=thumb_image_path, max_width=max_width)
|
||||
x = threading.Thread(target=generate_thumb_thread, args=(source_path[0],))
|
||||
x.start()
|
||||
if source_path:
|
||||
# Todo: convert image sequence to animated movie
|
||||
valid_formats = ['.mp4', '.mov', '.avi', '.mpg', '.mpeg', '.jpg', '.png', '.exr', '.mxf']
|
||||
is_valid_file_type = any(ele in source_path[0] for ele in valid_formats)
|
||||
if is_valid_file_type and not os.path.exists(thumb_video_path):
|
||||
save_first_frame(source_path=source_path[0], dest_path=thumb_image_path, max_width=max_width)
|
||||
x = threading.Thread(target=generate_thumb_thread, args=(source_path[0],))
|
||||
x.start()
|
||||
|
||||
Reference in New Issue
Block a user