[Enhancement] Delete media after "x" days (#160)

* [Enhancement] Adds ability to stop media from re-downloading (#159)

* Added column

* Added methods for ignoring media items from future download

* Added new deletion options to controller and UI

* Added controller actions and UI for editing a media item

* Added column to sources

* Added retention period to form

* [WIP] getting retention methods in place

* Hooked up retention worker

* Added column and UI to prevent automatic deletion

* Docs

* Removed unused backfill worker

* Added edit links to media item tabs on source view

* Clarified form wording

* Form wording (again)
This commit is contained in:
Kieran 2024-04-03 10:44:11 -07:00 committed by GitHub
parent f9c2f7b8f2
commit 79c61bca4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 576 additions and 171 deletions

View file

@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddPreventDownloadToMediaItems do
use Ecto.Migration
def change do
alter table(:media_items) do
add :prevent_download, :boolean, default: false, null: false
end
end
end

View file

@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddRetentionPeriodToSources do
use Ecto.Migration
def change do
alter table(:sources) do
add :retention_period_days, :integer
end
end
end

View file

@ -0,0 +1,10 @@
defmodule Pinchflat.Repo.Migrations.AddCulledAtToMediaItems do
use Ecto.Migration
def change do
alter table(:media_items) do
add :culled_at, :utc_datetime
add :prevent_culling, :boolean, default: false
end
end
end