diff --git a/lib/pinchflat/yt_dlp/command_runner.ex b/lib/pinchflat/yt_dlp/command_runner.ex index 7cd21dd..5d71661 100644 --- a/lib/pinchflat/yt_dlp/command_runner.ex +++ b/lib/pinchflat/yt_dlp/command_runner.ex @@ -3,6 +3,8 @@ defmodule Pinchflat.YtDlp.CommandRunner do Runs yt-dlp commands using the `System.cmd/3` function """ + require Logger + alias Pinchflat.Utils.CliUtils alias Pinchflat.YtDlp.YtDlpCommandRunner alias Pinchflat.Utils.FilesystemUtils, as: FSUtils @@ -24,7 +26,8 @@ defmodule Pinchflat.YtDlp.CommandRunner do Returns {:ok, binary()} | {:error, output, status}. """ @impl YtDlpCommandRunner - def run(url, command_opts, output_template, addl_opts \\ []) do + def run(url, action_name, command_opts, output_template, addl_opts \\ []) do + Logger.debug("Running yt-dlp command for action: #{action_name}") # This approach lets us mock the command for testing command = backend_executable() diff --git a/lib/pinchflat/yt_dlp/yt_dlp_command_runner.ex b/lib/pinchflat/yt_dlp/yt_dlp_command_runner.ex index 9b46a32..ff1cbcf 100644 --- a/lib/pinchflat/yt_dlp/yt_dlp_command_runner.ex +++ b/lib/pinchflat/yt_dlp/yt_dlp_command_runner.ex @@ -6,7 +6,7 @@ defmodule Pinchflat.YtDlp.YtDlpCommandRunner do yt-dlp command. """ - @callback run(binary(), keyword(), binary()) :: {:ok, binary()} | {:error, binary(), integer()} - @callback run(binary(), keyword(), binary(), keyword()) :: {:ok, binary()} | {:error, binary(), integer()} + @callback run(binary(), atom(), keyword(), binary()) :: {:ok, binary()} | {:error, binary(), integer()} + @callback run(binary(), atom(), keyword(), binary(), keyword()) :: {:ok, binary()} | {:error, binary(), integer()} @callback version() :: {:ok, binary()} | {:error, binary()} end