fix: "kanal canlı değil" durumunu hata olarak gösterme
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 <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,14 @@ async function findLiveVideoId(channelId: string): Promise<string | null> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user