debug: yt-dlp live-check hatalarını /status'ta görünür kıl

yt-dlp hem "kanal canlı değil" hem de gerçek bir hata (ağ engeli,
bot tespiti, extractor kırılması) durumunda non-zero exit code
veriyor; ikisi ayırt edilemiyordu. Son hata mesajı artık kanal
başına saklanıp GET /status içinde lastPollError alanında dönüyor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 15:54:51 +03:00
co-authored by Claude Sonnet 5
parent bae115f497
commit ad419f38b0
2 changed files with 14 additions and 2 deletions
+2
View File
@@ -1,6 +1,7 @@
import express from "express";
import { prisma } from "@streamclipper/db";
import { env } from "./env";
import { lastPollErrors } from "./youtubePolling";
export function startServer() {
const app = express();
@@ -26,6 +27,7 @@ export function startServer() {
lastCheckedAt: c.lastCheckedAt,
recording: c.sessions.length > 0,
activeSessionId: c.sessions[0]?.id ?? null,
lastPollError: lastPollErrors.get(c.channelId) ?? null,
})),
});
});