Added download cutoff date to sources
This commit is contained in:
parent
404d6feb99
commit
d526efe35b
3 changed files with 20 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ defmodule Pinchflat.Sources.Source do
|
|||
download_media
|
||||
last_indexed_at
|
||||
original_url
|
||||
download_cutoff_date
|
||||
media_profile_id
|
||||
)a
|
||||
|
||||
|
|
@ -45,8 +46,8 @@ defmodule Pinchflat.Sources.Source do
|
|||
field :fast_index, :boolean, default: false
|
||||
field :download_media, :boolean, default: true
|
||||
field :last_indexed_at, :utc_datetime
|
||||
# This should only be used for user reference going forward
|
||||
# as the collection_id should be used for all API calls
|
||||
# Only download media items that were published after this date
|
||||
field :download_cutoff_date, :date
|
||||
field :original_url, :string
|
||||
|
||||
belongs_to :media_profile, MediaProfile
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Pinchflat.Repo.Migrations.AddDownloadCutoffDateToSources do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:sources) do
|
||||
add :download_cutoff_date, :date
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue