[Enhancement] Allow custom yt-dlp options (#176)
* Added option for yt-dlp config file usage * renamed yt-dlp config file * refactored to use a precedence-based approach * Updated README
This commit is contained in:
@@ -27,7 +27,7 @@ defmodule Pinchflat.Boot.PreJobStartupTasksTest do
|
||||
end
|
||||
end
|
||||
|
||||
describe "create_blank_cookie_file" do
|
||||
describe "create_blank_yt_dlp_files" do
|
||||
test "creates a blank cookie file" do
|
||||
base_dir = Application.get_env(:pinchflat, :extras_directory)
|
||||
filepath = Path.join(base_dir, "cookies.txt")
|
||||
@@ -39,6 +39,18 @@ defmodule Pinchflat.Boot.PreJobStartupTasksTest do
|
||||
|
||||
assert File.exists?(filepath)
|
||||
end
|
||||
|
||||
test "creates a blank yt-dlp config file" do
|
||||
base_dir = Application.get_env(:pinchflat, :extras_directory)
|
||||
filepath = Path.join([base_dir, "yt-dlp-configs", "base-config.txt"])
|
||||
File.rm(filepath)
|
||||
|
||||
refute File.exists?(filepath)
|
||||
|
||||
PreJobStartupTasks.init(%{})
|
||||
|
||||
assert File.exists?(filepath)
|
||||
end
|
||||
end
|
||||
|
||||
describe "apply_default_settings" do
|
||||
|
||||
Reference in New Issue
Block a user