mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
[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:
parent
f9c2f7b8f2
commit
79c61bca4f
25 changed files with 576 additions and 171 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue