Updated UI and renamed attribute
This commit is contained in:
parent
994e281a67
commit
cc6b91ba03
3 changed files with 16 additions and 8 deletions
|
|
@ -78,8 +78,7 @@ defmodule Pinchflat.Sources.Source do
|
|||
field :collection_type, Ecto.Enum, values: [:channel, :playlist]
|
||||
field :index_frequency_minutes, :integer, default: 60 * 24
|
||||
field :fast_index, :boolean, default: false
|
||||
# TODO: consider renaming `indexing_only` to something like `when_needed` (but better)
|
||||
field :cookie_behaviour, Ecto.Enum, values: [:disabled, :indexing_only, :all_operations], default: :disabled
|
||||
field :cookie_behaviour, Ecto.Enum, values: [:disabled, :when_needed, :all_operations], default: :disabled
|
||||
field :download_media, :boolean, default: true
|
||||
field :last_indexed_at, :utc_datetime
|
||||
# Only download media items that were published after this date
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ defmodule PinchflatWeb.Sources.SourceHTML do
|
|||
]
|
||||
end
|
||||
|
||||
def friendly_cookie_behaviours do
|
||||
[
|
||||
{"Disabled", :disabled},
|
||||
{"When Needed", :when_needed},
|
||||
{"All Operations", :all_operations}
|
||||
]
|
||||
end
|
||||
|
||||
def cutoff_date_presets do
|
||||
[
|
||||
{"7 days", compute_date_offset(7)},
|
||||
|
|
|
|||
|
|
@ -86,12 +86,13 @@
|
|||
help="Unchecking still indexes media but it won't be downloaded until you enable this option"
|
||||
/>
|
||||
|
||||
<.input
|
||||
field={f[:use_cookies]}
|
||||
type="toggle"
|
||||
label="Use Cookies for Downloading"
|
||||
help="Uses your YouTube cookies for this source (if configured). Used for downloading private playlists and videos. See docs for important details"
|
||||
/>
|
||||
<.input
|
||||
field={f[:cookie_behaviour]}
|
||||
options={friendly_cookie_behaviours()}
|
||||
type="select"
|
||||
label="Cookie Behaviour"
|
||||
help="Uses your YouTube cookies for this source (if configured). 'When Needed' tries to minimize cookie usage except for certain indexing and downloading tasks. See docs"
|
||||
/>
|
||||
|
||||
<section x-show="advancedMode">
|
||||
<.input
|
||||
|
|
|
|||
Loading…
Reference in a new issue