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:
@@ -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,
|
||||
})),
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user