mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
[Enhancement] Add setting to restrict filenames to ASCII characters (#660)
* Added a new column for restricting filenames * Adds restrict-filenames to command runner * Added UI to settings form
This commit is contained in:
parent
ee2db3e9b7
commit
030f5fbdfe
6 changed files with 57 additions and 17 deletions
|
|
@ -162,6 +162,24 @@ defmodule Pinchflat.YtDlp.CommandRunnerTest do
|
|||
end
|
||||
end
|
||||
|
||||
describe "run/4 when testing misc options" do
|
||||
test "includes --restrict-filenames when enabled" do
|
||||
Settings.set(restrict_filenames: true)
|
||||
|
||||
assert {:ok, output} = Runner.run(@media_url, :foo, [], "")
|
||||
|
||||
assert String.contains?(output, "--restrict-filenames")
|
||||
end
|
||||
|
||||
test "doesn't include --restrict-filenames when disabled" do
|
||||
Settings.set(restrict_filenames: false)
|
||||
|
||||
assert {:ok, output} = Runner.run(@media_url, :foo, [], "")
|
||||
|
||||
refute String.contains?(output, "--restrict-filenames")
|
||||
end
|
||||
end
|
||||
|
||||
describe "version/0" do
|
||||
test "adds the version arg" do
|
||||
assert {:ok, output} = Runner.version()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue