Added media container to media profile form
This commit is contained in:
parent
78040a1815
commit
42375d3dce
3 changed files with 27 additions and 7 deletions
|
|
@ -1,4 +1,10 @@
|
||||||
<.simple_form :let={f} for={@changeset} action={@action}>
|
<.simple_form
|
||||||
|
:let={f}
|
||||||
|
for={@changeset}
|
||||||
|
action={@action}
|
||||||
|
x-data="{ advancedMode: !!JSON.parse(localStorage.getItem('advancedMode')) }"
|
||||||
|
x-init="$watch('advancedMode', value => localStorage.setItem('advancedMode', JSON.stringify(value)))"
|
||||||
|
>
|
||||||
<.error :if={@changeset.action}>
|
<.error :if={@changeset.action}>
|
||||||
Oops, something went wrong! Please check the errors below.
|
Oops, something went wrong! Please check the errors below.
|
||||||
</.error>
|
</.error>
|
||||||
|
|
@ -30,10 +36,14 @@
|
||||||
</.input>
|
</.input>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<h3 class="mt-8 text-2xl text-black dark:text-white">
|
<section class="flex justify-between items-center mt-8">
|
||||||
General Options
|
<h3 class="text-2xl text-white">
|
||||||
</h3>
|
General Options
|
||||||
|
</h3>
|
||||||
|
<span class="cursor-pointer hover:underline" x-on:click="advancedMode = !advancedMode">
|
||||||
|
Editing Mode: <span x-text="advancedMode ? 'Advanced' : 'Standard'"></span>
|
||||||
|
</span>
|
||||||
|
</section>
|
||||||
<section x-data="{
|
<section x-data="{
|
||||||
presets: {
|
presets: {
|
||||||
default: 'Default',
|
default: 'Default',
|
||||||
|
|
@ -203,6 +213,16 @@
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section x-show="advancedMode">
|
||||||
|
<.input
|
||||||
|
field={f[:media_container]}
|
||||||
|
type="text"
|
||||||
|
label="Media Container"
|
||||||
|
placeholder="mp4"
|
||||||
|
help="Don't change this if you're going to consume media via Plex. Leave blank for default"
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section x-data="{ presets: { default: null, media_center: 1, audio: null, archiving: 1 } }">
|
<section x-data="{ presets: { default: null, media_center: 1, audio: null, archiving: 1 } }">
|
||||||
<.input
|
<.input
|
||||||
field={f[:redownload_delay_days]}
|
field={f[:redownload_delay_days]}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<section x-data="{ mediaProfileId: null }">
|
<section x-data="{ mediaProfileId: null }">
|
||||||
<section class="flex justify-between items-center mt-4">
|
<section class="flex justify-between items-center mt-4">
|
||||||
<h3 class=" text-2xl text-black dark:text-white">
|
<h3 class="text-2xl text-white">
|
||||||
General Options
|
General Options
|
||||||
</h3>
|
</h3>
|
||||||
<span class="cursor-pointer hover:underline" x-on:click="advancedMode = !advancedMode">
|
<span class="cursor-pointer hover:underline" x-on:click="advancedMode = !advancedMode">
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ defmodule Pinchflat.Downloading.DownloadOptionBuilderTest do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "build/1 when testing format options" do
|
describe "build/1 when testing media quality and format options" do
|
||||||
test "includes quality options" do
|
test "includes quality options" do
|
||||||
resolutions = ["360", "480", "720", "1080", "2160", "4320"]
|
resolutions = ["360", "480", "720", "1080", "2160", "4320"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue