From 94aec6bff549b08ad4c5a2d175db665c77df47c7 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Wed, 23 Apr 2025 23:34:43 +0300 Subject: [PATCH] Update scripts --- scripts/commands/playlist/test.ts | 7 ++++++- scripts/core/streamTester.ts | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/commands/playlist/test.ts b/scripts/commands/playlist/test.ts index a37b7ecd0..a5add7cb6 100644 --- a/scripts/commands/playlist/test.ts +++ b/scripts/commands/playlist/test.ts @@ -154,9 +154,14 @@ function drawTable() { } } -function onFinish() { +function onFinish(error) { clearInterval(interval) + if (error) { + console.error(error) + process.exit(1) + } + drawTable() console.log(chalk.red(`\n${errors + warnings} problems (${errors} errors, ${warnings} warnings)`)) diff --git a/scripts/core/streamTester.ts b/scripts/core/streamTester.ts index 89c44de74..860844b40 100644 --- a/scripts/core/streamTester.ts +++ b/scripts/core/streamTester.ts @@ -18,8 +18,8 @@ export class StreamTester { return this.checker.checkStream({ url: stream.url, http: { - referrer: stream.getHttpReferrer(), - 'user-agent': stream.getHttpUserAgent() + referrer: stream.getReferrer(), + 'user-agent': stream.getUserAgent() } }) }