Media downloading indexing options (round 2) (#14)
* Adds options + option builder + metadata parsing for media thumbnails * Added release-type options to media profile; built option parser for indexing operations * Added new media_profile options to creation form; made show helper for rendering database items * Added options for downloading/embedding metadata * Adds option on sources to not download media (index only) * reformatted docs
This commit is contained in:
@@ -15,6 +15,12 @@ defmodule Pinchflat.Profiles.MediaProfile do
|
||||
download_auto_subs
|
||||
embed_subs
|
||||
sub_langs
|
||||
download_thumbnail
|
||||
embed_thumbnail
|
||||
download_metadata
|
||||
embed_metadata
|
||||
shorts_behaviour
|
||||
livestream_behaviour
|
||||
)a
|
||||
|
||||
@required_fields ~w(name output_path_template)a
|
||||
@@ -22,11 +28,26 @@ defmodule Pinchflat.Profiles.MediaProfile do
|
||||
schema "media_profiles" do
|
||||
field :name, :string
|
||||
field :output_path_template, :string
|
||||
|
||||
field :download_subs, :boolean, default: true
|
||||
field :download_auto_subs, :boolean, default: true
|
||||
field :embed_subs, :boolean, default: true
|
||||
field :sub_langs, :string, default: "en"
|
||||
|
||||
field :download_thumbnail, :boolean, default: true
|
||||
field :embed_thumbnail, :boolean, default: true
|
||||
|
||||
field :download_metadata, :boolean, default: true
|
||||
field :embed_metadata, :boolean, default: true
|
||||
|
||||
# NOTE: these do NOT speed up indexing - the indexer still has to go
|
||||
# through the entire collection to determine if a video is a short or
|
||||
# a livestream.
|
||||
# NOTE: these can BOTH be set to :only which will download shorts and
|
||||
# livestreams _only_ and ignore regular videos.
|
||||
field :shorts_behaviour, Ecto.Enum, values: [:include, :exclude, :only], default: :include
|
||||
field :livestream_behaviour, Ecto.Enum, values: [:include, :exclude, :only], default: :include
|
||||
|
||||
has_many :sources, Source
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
|
||||
Reference in New Issue
Block a user