diff --git a/lib/pinchflat/sources/source.ex b/lib/pinchflat/sources/source.ex index b6d9154..a0e367b 100644 --- a/lib/pinchflat/sources/source.ex +++ b/lib/pinchflat/sources/source.ex @@ -27,6 +27,7 @@ defmodule Pinchflat.Sources.Source do series_directory index_frequency_minutes fast_index + use_cookies download_media last_indexed_at original_url @@ -73,6 +74,7 @@ defmodule Pinchflat.Sources.Source do field :collection_type, Ecto.Enum, values: [:channel, :playlist] field :index_frequency_minutes, :integer, default: 60 * 24 field :fast_index, :boolean, default: false + field :use_cookies, :boolean, default: true field :download_media, :boolean, default: true field :last_indexed_at, :utc_datetime # Only download media items that were published after this date diff --git a/priv/repo/erd.png b/priv/repo/erd.png index 70f395c..958d3d5 100644 Binary files a/priv/repo/erd.png and b/priv/repo/erd.png differ diff --git a/priv/repo/migrations/20240814154844_add_use_cookies_to_sources.exs b/priv/repo/migrations/20240814154844_add_use_cookies_to_sources.exs new file mode 100644 index 0000000..c7b0f59 --- /dev/null +++ b/priv/repo/migrations/20240814154844_add_use_cookies_to_sources.exs @@ -0,0 +1,9 @@ +defmodule Pinchflat.Repo.Migrations.AddUseCookiesToSources do + use Ecto.Migration + + def change do + alter table(:sources) do + add :use_cookies, :boolean, default: true, null: false + end + end +end