[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:
Kieran
2024-04-10 20:17:22 -07:00
committed by GitHub
parent 0fcdd1df84
commit 8fbcc8b289
7 changed files with 172 additions and 25 deletions
@@ -42,12 +42,13 @@ defmodule Pinchflat.YtDlp.CommandRunnerTest do
end
end
describe "run/4 when testing cookie options" do
describe "run/4 when testing external file options" do
setup do
base_dir = Application.get_env(:pinchflat, :extras_directory)
cookie_file = Path.join(base_dir, "cookies.txt")
yt_dlp_file = Path.join([base_dir, "yt-dlp-configs", "main.txt"])
{:ok, cookie_file: cookie_file}
{:ok, cookie_file: cookie_file, yt_dlp_file: yt_dlp_file}
end
test "includes cookie options when cookies.txt exists", %{cookie_file: cookie_file} do