From 2b8035ba686e295e8073bb6072813ada87c75473 Mon Sep 17 00:00:00 2001 From: ayrisdev Date: Sun, 30 Aug 2026 21:32:25 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20"kanal=20canl=C4=B1=20de=C4=9Fil"=20duru?= =?UTF-8?q?munu=20hata=20olarak=20g=C3=B6sterme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yt-dlp bunu da non-zero exit code ile bildiriyor, bu yüzden panelde her kontrolde (kanal gerçekten sadece canlı değilken bile) kırmızı "hata" rozeti görünüyordu — yanıltıcıydı. "is not currently live" mesajı artık gerçek bir hata olarak işlenmiyor. Co-Authored-By: Claude Sonnet 5 --- apps/api-daemon/src/youtubePolling.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/api-daemon/src/youtubePolling.ts b/apps/api-daemon/src/youtubePolling.ts index 2c33970..f57e1cd 100644 --- a/apps/api-daemon/src/youtubePolling.ts +++ b/apps/api-daemon/src/youtubePolling.ts @@ -46,7 +46,14 @@ async function findLiveVideoId(channelId: string): Promise { return videoId || null; } catch (err) { const message = err instanceof Error ? err.message : String(err); - lastPollErrors.set(channelId, message.slice(0, 500)); + // yt-dlp reports "not live" as a non-zero exit too — that's a normal, + // expected outcome on every check where the channel isn't broadcasting, + // not a failure worth surfacing as an error in the panel. + if (!/is not currently live/.test(message)) { + lastPollErrors.set(channelId, message.slice(0, 500)); + } else { + lastPollErrors.delete(channelId); + } return null; } }