Skip to content

video_ffmpeg add df.sanitize_filename() #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contrib/video_ffmpeg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ local function export(extra_data)
local img_ext = extra_data["img_ext"]
local output_file = extra_data["output_file"]

local dir_create_result = df.mkdir(df.get_path(output_file))
local dir_create_result = df.mkdir(df.sanitize_filename(df.get_path(output_file)))
if dir_create_result ~= 0 then return dir_create_result end

local cmd = ffmpeg_path.." -y -r "..fps.." -i "..dir..PS.."%d"..img_ext.." -s:v "..res.." -c:v "..codec.." -crf 18 -preset veryslow "..df.sanitize_filename(output_file)
Expand All @@ -424,7 +424,7 @@ local function finalize_export(storage, images_table, extra_data)

dt.print(_("prepare merge process"))

local result = df.mkdir(tmp_dir)
local result = df.mkdir(df.sanitize_filename(tmp_dir))
if result ~= 0 then dt.print(_("ERROR: cannot create temp directory")) end

local images = extra_data["images"]
Expand All @@ -441,11 +441,11 @@ local function finalize_export(storage, images_table, extra_data)
else
dt.print(_("SUCCESS"))
if extra_data["open_after_export"] then
dsys.launch_default_app(path)
dsys.launch_default_app(df.sanitize_filename(path))
end
end

df.rmdir(tmp_dir)
df.rmdir(df.sanitize_filename(tmp_dir))
end

dt.register_storage(
Expand Down