mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-20 05:36:03 -05:00
fix: flake8
This commit is contained in:
@@ -47,7 +47,7 @@ class Command(BaseCommand):
|
||||
with open(file_path, 'w') as f:
|
||||
f.write("translation_strings = {\n")
|
||||
for key, value in translation_strings_wip.items():
|
||||
f.write(f' "{key}": "{value}",\n')
|
||||
f.write(f' "{key}": "{value}",\n') # noqa
|
||||
f.write("}\n\n")
|
||||
|
||||
f.write("replacement_strings = {\n")
|
||||
|
||||
@@ -386,7 +386,7 @@ def produce_sprite_from_video(friendly_token):
|
||||
output_name = tmpdirname + "/sprites.jpg"
|
||||
|
||||
fps = getattr(settings, 'SPRITE_NUM_SECS', 10)
|
||||
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files]
|
||||
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files] # noqa
|
||||
run_command(ffmpeg_cmd)
|
||||
image_files = [f for f in os.listdir(tmpdirname) if f.startswith("img") and f.endswith(".jpg")]
|
||||
image_files = sorted(image_files, key=lambda x: int(re.search(r'\d+', x).group()))
|
||||
|
||||
Reference in New Issue
Block a user