feat: kanal başına segment süresini panelden ayarlama
Channel.segmentTimeSec (nullable, null = global SEGMENT_TIME_SEC env var'ı kullan) eklendi. Kanal detay sayfasından dakika cinsinden girilebiliyor, StreamIngestJob'a taşınıp streamIngest.ts'te ffmpeg'in -segment_time argümanına yansıyor. Sadece o kanal için bundan sonra başlayacak yeni kayıt oturumlarını etkiler — halihazırda çalışan bir ffmpeg process'inin segment süresi zaten sabitlenmiş durumda. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,14 @@ import {
|
||||
forceStartCapture,
|
||||
retryRender,
|
||||
cancelRender,
|
||||
updateChannelSegmentTime,
|
||||
} from "../../actions";
|
||||
import { ConfirmButton } from "../../components/ConfirmButton";
|
||||
import { LiveLogViewer } from "../../components/LiveLogViewer";
|
||||
import { SessionTimer } from "../../components/SessionTimer";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Badge, type badgeVariants } from "@/components/ui/badge";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import type { VariantProps } from "class-variance-authority";
|
||||
@@ -114,6 +116,34 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{
|
||||
{channel.lastCheckedAt ? new Date(channel.lastCheckedAt).toLocaleString("tr-TR") : "—"}
|
||||
</p>
|
||||
|
||||
<form
|
||||
action={updateChannelSegmentTime.bind(null, channel.id)}
|
||||
className="flex flex-wrap items-end gap-2"
|
||||
>
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<Label htmlFor="segmentTimeMin" className="text-xs text-muted-foreground">
|
||||
Bu kanal için segment süresi (dakika)
|
||||
</Label>
|
||||
<Input
|
||||
id="segmentTimeMin"
|
||||
name="segmentTimeMin"
|
||||
type="number"
|
||||
min={1}
|
||||
max={60}
|
||||
step={0.5}
|
||||
placeholder="varsayılan (15)"
|
||||
defaultValue={channel.segmentTimeSec ? channel.segmentTimeSec / 60 : ""}
|
||||
className="w-40"
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit" variant="outline" size="sm">
|
||||
Kaydet
|
||||
</Button>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
Boş bırakılırsa global varsayılan kullanılır. Sadece bundan sonra başlayacak kayıtları etkiler.
|
||||
</span>
|
||||
</form>
|
||||
|
||||
{status === undefined && (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
api-daemon'dan canlı durum alınamadı (servis erişilemez olabilir).
|
||||
|
||||
Reference in New Issue
Block a user