Add resolution option (#21)
* added preferred resolution to profiles * Add resolution to download option builder
This commit is contained in:
@@ -18,4 +18,14 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
|
||||
{"Only", :only}
|
||||
]
|
||||
end
|
||||
|
||||
def friendly_resolution_options do
|
||||
[
|
||||
{"2160p", "4k"},
|
||||
{"1080p", "1080p"},
|
||||
{"720p", "720p"},
|
||||
{"480p", "480p"},
|
||||
{"360p", "360p"}
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<:col :let={media_profile} label="Output Template">
|
||||
<code class="text-sm"><%= media_profile.output_path_template %></code>
|
||||
</:col>
|
||||
<:col :let={media_profile} label="Preferred Resolution">
|
||||
<%= media_profile.preferred_resolution %>
|
||||
</:col>
|
||||
<:col :let={media_profile} label="" class="flex place-content-evenly">
|
||||
<.link
|
||||
navigate={~p"/media_profiles/#{media_profile.id}"}
|
||||
|
||||
+12
@@ -66,6 +66,18 @@
|
||||
label="Include Livestreams?"
|
||||
/>
|
||||
|
||||
<h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
|
||||
Quality Options
|
||||
</h3>
|
||||
|
||||
<.input
|
||||
field={f[:preferred_resolution]}
|
||||
options={friendly_resolution_options()}
|
||||
type="select"
|
||||
label="Preferred Resolution"
|
||||
help="Will grab the closest available resolution if your preferred is not available"
|
||||
/>
|
||||
|
||||
<:actions>
|
||||
<.button class="mt-15 mb-5 sm:mb-7.5">Save Media profile</.button>
|
||||
</:actions>
|
||||
|
||||
Reference in New Issue
Block a user