Added new options to default template and UI

This commit is contained in:
Kieran Eglin 2024-03-02 11:51:41 -08:00
parent b65a88cc29
commit ce4497bc63
No known key found for this signature in database
GPG key ID: 193984967FCF432D
3 changed files with 6 additions and 2 deletions

View file

@ -29,7 +29,8 @@ defmodule Pinchflat.Profiles.MediaProfile do
schema "media_profiles" do
field :name, :string
field :output_path_template, :string, default: "/{{ channel }}/{{ title }}/{{ title }} [{{ id }}].{{ ext }}"
field :output_path_template, :string,
default: "/{{ source_custom_name }}/{{ title }}/{{ title }} [{{ id }}].{{ ext }}"
field :download_subs, :boolean, default: true
field :download_auto_subs, :boolean, default: true

View file

@ -33,6 +33,9 @@ defmodule Pinchflat.Profiles.Options.YtDlp.OutputPathBuilder do
end
end
# This isn't the only source for custom options, since they can be passed in my the caller.
# `download_option_builder` is the most likely place for other custom options to be added,
# but if in doubt just search the codebase for `OutputPathBuilder.build`.
defp custom_yt_dlp_option_map do
%{
# Individual parts of the upload date

View file

@ -30,7 +30,7 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
end
def custom_output_template_options do
~w(upload_day upload_month upload_year)a
~w(upload_day upload_month upload_year source_custom_name source_collection_type)a
end
def common_output_template_options do