frontend: align types to backend, playout HLS, rm Jellyfin proxy (#12)
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { BlockTimeline, BLOCK_COLORS } from "./block-timeline";
|
||||
import { AlgorithmicFilterEditor } from "./algorithmic-filter-editor";
|
||||
import { RecyclePolicyEditor } from "./recycle-policy-editor";
|
||||
import { RotationPolicyEditor } from "./rotation-policy-editor";
|
||||
import { WebhookEditor } from "./webhook-editor";
|
||||
import { AccessSettingsEditor } from "./access-settings-editor";
|
||||
import { LogoEditor } from "./logo-editor";
|
||||
@@ -27,7 +27,7 @@ import type {
|
||||
FillStrategy,
|
||||
MediaFilter,
|
||||
ProviderInfo,
|
||||
RecyclePolicy,
|
||||
RotationPolicy,
|
||||
Weekday,
|
||||
} from "@/lib/types";
|
||||
import { WEEKDAYS, WEEKDAY_LABELS } from "@/lib/types";
|
||||
@@ -261,9 +261,9 @@ function BlockEditor({ block, index, errors, providers, onChange }: BlockEditorP
|
||||
<label className="flex cursor-pointer items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={block.ignore_recycle_policy ?? false}
|
||||
checked={block.ignore_rotation_policy ?? false}
|
||||
onChange={(e) =>
|
||||
onChange({ ...block, ignore_recycle_policy: e.target.checked })
|
||||
onChange({ ...block, ignore_rotation_policy: e.target.checked })
|
||||
}
|
||||
className="accent-zinc-400"
|
||||
/>
|
||||
@@ -301,7 +301,7 @@ function BlockEditor({ block, index, errors, providers, onChange }: BlockEditorP
|
||||
className="w-full resize-none rounded-md border border-zinc-700 bg-zinc-800 px-3 py-2 font-mono text-xs text-zinc-100 placeholder:text-zinc-600 focus:border-zinc-500 focus:outline-none"
|
||||
/>
|
||||
<p className="text-[11px] text-zinc-600">
|
||||
One Jellyfin item ID per line, played in order.
|
||||
One item ID per line, played in order.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
@@ -339,12 +339,11 @@ interface EditChannelSheetProps {
|
||||
description: string;
|
||||
timezone: string;
|
||||
schedule_config: { day_blocks: Record<Weekday, ProgrammingBlock[]> };
|
||||
recycle_policy: RecyclePolicy;
|
||||
rotation_policy: RotationPolicy;
|
||||
auto_schedule: boolean;
|
||||
access_mode?: AccessMode;
|
||||
access_password?: string;
|
||||
access_mode?: string;
|
||||
logo?: string | null;
|
||||
logo_position?: LogoPosition;
|
||||
logo_position?: string;
|
||||
logo_opacity?: number;
|
||||
webhook_url?: string | null;
|
||||
webhook_poll_interval_secs?: number;
|
||||
@@ -401,7 +400,7 @@ export function EditChannelSheet({
|
||||
description: form.description,
|
||||
timezone: form.timezone,
|
||||
day_blocks: form.dayBlocks,
|
||||
recycle_policy: form.recyclePolicy,
|
||||
rotation_policy: form.rotationPolicy,
|
||||
auto_schedule: form.autoSchedule,
|
||||
access_mode: form.accessMode,
|
||||
access_password: form.accessPassword,
|
||||
@@ -418,10 +417,9 @@ export function EditChannelSheet({
|
||||
description: form.description,
|
||||
timezone: form.timezone,
|
||||
schedule_config: { day_blocks: form.dayBlocks },
|
||||
recycle_policy: form.recyclePolicy,
|
||||
rotation_policy: form.rotationPolicy,
|
||||
auto_schedule: form.autoSchedule,
|
||||
access_mode: form.accessMode !== "public" ? form.accessMode : "public",
|
||||
access_password: form.accessPassword || "",
|
||||
access_mode: form.accessMode,
|
||||
logo: form.logo,
|
||||
logo_position: form.logoPosition,
|
||||
logo_opacity: form.logoOpacity / 100,
|
||||
@@ -540,12 +538,12 @@ export function EditChannelSheet({
|
||||
|
||||
<section className="space-y-3">
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider text-zinc-500">
|
||||
Recycle policy
|
||||
Rotation policy
|
||||
</h3>
|
||||
<RecyclePolicyEditor
|
||||
policy={form.recyclePolicy}
|
||||
<RotationPolicyEditor
|
||||
policy={form.rotationPolicy}
|
||||
errors={fieldErrors}
|
||||
onChange={form.setRecyclePolicy}
|
||||
onChange={form.setRotationPolicy}
|
||||
/>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user