diff --git a/.env.example b/.env.example index 3ab47a9..04d101e 100644 --- a/.env.example +++ b/.env.example @@ -12,7 +12,7 @@ TELEGRAM_BOT_TOKEN= TELEGRAM_CHAT_ID= POLL_INTERVAL_MS=60000 -SEGMENT_TIME_SEC=900 +SEGMENT_TIME_SEC=300 API_DAEMON_PORT=4001 # Signs the panel's login session cookies (frontend). Generate with: diff --git a/apps/api-daemon/src/env.ts b/apps/api-daemon/src/env.ts index f0eaf82..ab877c2 100644 --- a/apps/api-daemon/src/env.ts +++ b/apps/api-daemon/src/env.ts @@ -4,7 +4,7 @@ export const env = { redisUrl: process.env.REDIS_URL ?? "redis://localhost:6379", sharedMediaRoot: process.env.SHARED_MEDIA_ROOT ?? "./shared-media", pollIntervalMs: Number(process.env.POLL_INTERVAL_MS ?? 60_000), - segmentTimeSec: Number(process.env.SEGMENT_TIME_SEC ?? 900), + segmentTimeSec: Number(process.env.SEGMENT_TIME_SEC ?? 300), port: Number(process.env.API_DAEMON_PORT ?? 4001), forceLiveUrl: process.env.FORCE_LIVE_URL ?? "", ytdlpPotProviderUrl: process.env.YTDLP_POT_PROVIDER_URL ?? "", diff --git a/apps/frontend/app/page.tsx b/apps/frontend/app/page.tsx index 9c99550..05dea3c 100644 --- a/apps/frontend/app/page.tsx +++ b/apps/frontend/app/page.tsx @@ -6,8 +6,8 @@ import { formatTr } from "../lib/formatDate"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Badge } from "@/components/ui/badge"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; +import { Card, CardContent, CardHeader, CardTitle, CardFooter } from "@/components/ui/card"; +import { cn } from "@/lib/utils"; export const dynamic = "force-dynamic"; @@ -47,9 +47,9 @@ export default async function DashboardPage() { {channels.length === 0 ? (

Henüz kanal eklenmedi.

) : ( - - - {channels.length} kanal +
+
+ {channels.length} kanal
- - - - - - Kanal - Durum - Kayıt - Son Kontrol - Aksiyon - - - - {channels.map((c) => { - const recording = c.sessions.length > 0; - const status = statuses.get(c.id); - return ( - - - - {c.name} - {" "} - {c.youtubeHandle} - - - {c.isActive ? "Aktif" : "Pasif"} - - -
- {recording ? "🔴 Kayıtta" : "—"} - {status?.lastPollError && ( - - hata - - )} -
-
- - {c.lastCheckedAt ? formatTr(c.lastCheckedAt) : "—"} - - -
-
- - -
- - -
-
-
- ); - })} -
-
-
- +
+ +
+ {channels.map((c) => { + const recording = c.sessions.length > 0; + const status = statuses.get(c.id); + return ( + + +
+ + {c.name} + + + {c.isActive ? "Aktif" : "Pasif"} + +
+ {c.youtubeHandle} +
+ + +
+ + {recording ? "🔴 Kayıtta" : "Kayıtta değil"} + + {status?.lastPollError && ( + + hata + + )} +
+ + Son kontrol: {c.lastCheckedAt ? formatTr(c.lastCheckedAt) : "—"} + +
+ + +
+ +
+
+ +
+
+
+ ); + })} +
+
)} ); diff --git a/apps/worker/worker/signal_detection.py b/apps/worker/worker/signal_detection.py index 2d9a60a..56efbbc 100644 --- a/apps/worker/worker/signal_detection.py +++ b/apps/worker/worker/signal_detection.py @@ -17,7 +17,7 @@ WINDOW_SEC = 1.0 PEAK_STD_MULTIPLIER = 1.5 CANDIDATE_PAD_SEC = 45 CHAT_SPIKE_MULTIPLIER = 3 -SEGMENT_TIME_SEC = int(os.environ.get("SEGMENT_TIME_SEC", "900")) +SEGMENT_TIME_SEC = int(os.environ.get("SEGMENT_TIME_SEC", "300")) stt_scoring_queue = Queue(QUEUE_NAMES["STT_SCORING"], {"connection": REDIS_URL}) diff --git a/docker-compose.yml b/docker-compose.yml index d156e6a..b71c331 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: DATABASE_URL: postgresql://streamclipper:streamclipper@sc_postgres:5432/streamclipper SHARED_MEDIA_ROOT: /shared-media POLL_INTERVAL_MS: ${POLL_INTERVAL_MS:-60000} - SEGMENT_TIME_SEC: ${SEGMENT_TIME_SEC:-900} + SEGMENT_TIME_SEC: ${SEGMENT_TIME_SEC:-300} API_DAEMON_PORT: ${API_DAEMON_PORT:-4001} FORCE_LIVE_URL: ${FORCE_LIVE_URL:-} TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} @@ -61,7 +61,7 @@ services: REDIS_URL: redis://sc_redis:6379 DATABASE_URL: postgresql://streamclipper:streamclipper@sc_postgres:5432/streamclipper SHARED_MEDIA_ROOT: /shared-media - SEGMENT_TIME_SEC: ${SEGMENT_TIME_SEC:-900} + SEGMENT_TIME_SEC: ${SEGMENT_TIME_SEC:-300} OPENAI_API_KEY: ${OPENAI_API_KEY:-} TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-}