diff --git a/lib/pinchflat/profiles/media_profile.ex b/lib/pinchflat/profiles/media_profile.ex
index 0655e06..7ecddb7 100644
--- a/lib/pinchflat/profiles/media_profile.ex
+++ b/lib/pinchflat/profiles/media_profile.ex
@@ -35,14 +35,14 @@ defmodule Pinchflat.Profiles.MediaProfile do
field :download_subs, :boolean, default: false
field :download_auto_subs, :boolean, default: false
- field :embed_subs, :boolean, default: true
+ field :embed_subs, :boolean, default: false
field :sub_langs, :string, default: "en"
field :download_thumbnail, :boolean, default: false
- field :embed_thumbnail, :boolean, default: true
+ field :embed_thumbnail, :boolean, default: false
field :download_metadata, :boolean, default: false
- field :embed_metadata, :boolean, default: true
+ field :embed_metadata, :boolean, default: false
field :download_nfo, :boolean, default: false
# NOTE: these do NOT speed up indexing - the indexer still has to go
diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex
index 673b7c9..52295d0 100644
--- a/lib/pinchflat_web/components/core_components.ex
+++ b/lib/pinchflat_web/components/core_components.ex
@@ -317,7 +317,7 @@ defmodule PinchflatWeb.CoreComponents do
<%= @label_suffix %>
diff --git a/lib/pinchflat_web/components/custom_components/button_components.ex b/lib/pinchflat_web/components/custom_components/button_components.ex
index 304e280..c6f6e01 100644
--- a/lib/pinchflat_web/components/custom_components/button_components.ex
+++ b/lib/pinchflat_web/components/custom_components/button_components.ex
@@ -28,9 +28,10 @@ defmodule PinchflatWeb.CustomComponents.ButtonComponents do
"#{@rounding} inline-flex items-center justify-center px-8 py-4",
"#{@color}",
"hover:bg-opacity-90 lg:px-8 xl:px-10",
- "disabled:bg-opacity-50 disabled:cursor-not-allowed disabled:text-gray-2",
+ "disabled:bg-opacity-50 disabled:cursor-not-allowed disabled:text-grey-5",
@class
]}
+ type={@type}
disabled={@disabled}
{@rest}
>
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex
index 6e66038..8f84700 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex
@@ -56,11 +56,12 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
)a
end
- def output_template_preset_options do
+ def preset_options do
[
- {"Default", default_output_template()},
- {"Media Center (Plex, Jellyfin, Kodi, etc.)", media_center_output_template()},
- {"Audio", audio_output_template()}
+ {"Default", "default"},
+ {"Media Center (Plex, Jellyfin, Kodi, etc.)", "media_center"},
+ {"Music", "audio"},
+ {"Archiving", "archiving"}
]
end
diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/media_profile_form.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/media_profile_form.html.heex
index b1cdbe5..3eba728 100644
--- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/media_profile_form.html.heex
+++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/media_profile_form.html.heex
@@ -3,149 +3,219 @@
Oops, something went wrong! Please check the errors below.
-
- General Options
-
- <.input
- field={f[:name]}
- type="text"
- label="Name"
- placeholder="New Profile"
- help="Something descriptive. Does not impact indexing or downloading (required)"
- />
+
+
+ Use a Preset
+
+
+ <.input
+ prompt="Select preset"
+ name="media_profile_preset"
+ value=""
+ options={preset_options()}
+ type="select"
+ x-model="selection"
+ inputclass="w-full"
+ help="You can further customize the settings after selecting a preset. This is just a starting point"
+ >
+ <.button
+ class="h-13 w-2/5 lg:w-1/5 ml-2 md:ml-4"
+ rounding="rounded"
+ type="button"
+ x-on:click="selectedPreset = selection; selection = null"
+ x-bind:disabled="!selection"
+ >
+ SelectPreset
+
+
+
-
- Output Path Options
-
+
+ General Options
+
-
-
+
+ <.input
+ field={f[:name]}
+ type="text"
+ label="Name"
+ placeholder="New Profile"
+ help="Something descriptive. Does not impact indexing or downloading (required)"
+ x-init="$watch('selectedPreset', p => p && ($el.value = presets[p]))"
+ />
+
+
+
<.input
field={f[:output_path_template]}
type="text"
inputclass="font-mono"
label="Output path template"
help="Must end with .{{ ext }}. See below for more details. The default is good for most cases (required)"
- x-model="template"
+ x-init="$watch('selectedPreset', p => p && ($el.value = presets[p]))"
/>
-