Use min() instead of sorting list

This commit is contained in:
Tulir Asokan
2022-01-05 21:23:58 +02:00
parent 28845b9daf
commit 9f48eca5a6
+1 -1
View File
@@ -111,7 +111,7 @@ if lottieconverter and ffmpeg:
args=("-", file_template, "pngs", f"{width}x{height}", str(fps)),
input_data=file,
)
first_frame_name = sorted(os.listdir(tmpdir))[0]
first_frame_name = min(os.listdir(tmpdir))
with open(f"{tmpdir}/{first_frame_name}", "rb") as first_frame_file:
first_frame_data = first_frame_file.read()
webm_data = await ffmpeg.convert_path(