Download cutoff date for sources (#69)
* Added new uploaded_at column to media items * Updated indexer to pull upload date * Updates media item creation to update on conflict * Added download cutoff date to sources * Applies cutoff date logic to pending media logic * Updated docs
This commit is contained in:
@@ -598,9 +598,14 @@ defmodule PinchflatWeb.CoreComponents do
|
||||
def list_items_from_map(assigns) do
|
||||
attrs =
|
||||
Enum.filter(assigns.map, fn
|
||||
{_, %{__struct__: _}} -> false
|
||||
{_, [%{__meta__: _} | _]} -> false
|
||||
_ -> true
|
||||
{_, %{__struct__: s}} when s not in [Date, DateTime] ->
|
||||
false
|
||||
|
||||
{_, [%{__meta__: _} | _]} ->
|
||||
false
|
||||
|
||||
_ ->
|
||||
true
|
||||
end)
|
||||
|
||||
assigns = assign(assigns, iterable_attributes: attrs)
|
||||
|
||||
@@ -57,6 +57,14 @@
|
||||
help="Unchecking still indexes media but it won't be downloaded until you enable this option"
|
||||
/>
|
||||
|
||||
<.input
|
||||
field={f[:download_cutoff_date]}
|
||||
type="text"
|
||||
label="Download Cutoff Date"
|
||||
placeholder="YYYY-MM-DD"
|
||||
help="Only download media uploaded after this date. Leave blank to download all media. Must be in YYYY-MM-DD format"
|
||||
/>
|
||||
|
||||
<.button class="my-10 sm:mb-7.5 w-full sm:w-auto">Save Source</.button>
|
||||
|
||||
<div class="rounded-sm dark:bg-meta-4 p-4 md:p-6 mb-5">
|
||||
|
||||
Reference in New Issue
Block a user