* Added a command for updating yt-dlp * Added a yt-dlp update worker to run daily * Added a new file that runs post-boot when the app is ready to serve requests; put yt-dlp updater in there * Updated config to expose the current env globally; updated startup tasks to not run in test env * Removes unneeded test code
14 lines
591 B
Elixir
14 lines
591 B
Elixir
defmodule Pinchflat.YtDlp.YtDlpCommandRunner do
|
|
@moduledoc """
|
|
A behaviour for running CLI commands against a downloader backend (yt-dlp).
|
|
|
|
Used so we can implement Mox for testing without actually running the
|
|
yt-dlp command.
|
|
"""
|
|
|
|
@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()}
|
|
@callback update() :: {:ok, binary()} | {:error, binary()}
|
|
end
|