From 66023f9c98462486f42ec883ea42eec2968f1ad1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Feb 2025 11:38:17 +0100 Subject: [PATCH] Fix runner files watch --- .../peertube-runner/src/server/process/shared/process-live.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/peertube-runner/src/server/process/shared/process-live.ts b/apps/peertube-runner/src/server/process/shared/process-live.ts index c7e212afa..d3272b346 100644 --- a/apps/peertube-runner/src/server/process/shared/process-live.ts +++ b/apps/peertube-runner/src/server/process/shared/process-live.ts @@ -68,10 +68,10 @@ export class ProcessLiveRTMPHLSTranscoding { const bitrate = await getVideoStreamBitrate(this.payload.input.rtmpUrl, probe) const { ratio } = await getVideoStreamDimensionsInfo(this.payload.input.rtmpUrl, probe) - const m3u8Watcher = watch(this.outputPath, { ignored: (path, stats) => stats?.isFile() && !path.endsWith('.m3u8') }) + const m3u8Watcher = watch(this.outputPath, { ignored: path => path !== this.outputPath && !path.endsWith('.m3u8') }) this.fsWatchers.push(m3u8Watcher) - const tsWatcher = watch(this.outputPath, { ignored: (path, stats) => stats?.isFile() && !path.endsWith('.ts') }) + const tsWatcher = watch(this.outputPath, { ignored: path => path !== this.outputPath && !path.endsWith('.ts') }) this.fsWatchers.push(tsWatcher) m3u8Watcher.on('change', p => {