[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
25 changed files with 576 additions and 171 deletions
@@ -3,6 +3,14 @@ defmodule PinchflatWeb.MediaItems.MediaItemHTML do
embed_templates "media_item_html/*"
@doc """
Renders a media item form.
"""
attr :changeset, Ecto.Changeset, required: true
attr :action, :string, required: true
def media_item_form(assigns)
def media_file_exists?(media_item) do
!!media_item.media_filepath and File.exists?(media_item.media_filepath)
end