From 4daf6143f99b3ce321feacd2534904d854aa3745 Mon Sep 17 00:00:00 2001 From: localhost Date: Thu, 2 Oct 2025 07:14:13 +0200 Subject: [PATCH] filtering out ai dubs --- utils/companion.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/companion.ts b/utils/companion.ts index 0879d7f..aa1c96a 100644 --- a/utils/companion.ts +++ b/utils/companion.ts @@ -22,6 +22,11 @@ export async function getVideoStreams( .filter((format) => !!format.quality_label?.toLowerCase().includes(options.videoQuality?.toLowerCase() || '')) .sort((a, b) => (a.contentLength || 0) - (b.contentLength || 0))?.[0] const lowestStorageAudio = adaptiveFormats + .filter(f => { + if (f.is_auto_dubbed) return false + if (f.audio_track && !f.audio_track.display_name.endsWith('original')) return false + return true + }) .filter((format) => !!format.audio_quality?.toLowerCase().includes(options.audioQuality?.toLowerCase() || '')) .sort((a, b) => (a.contentLength || 0) - (b.contentLength || 0))?.[0] const lowestOptions = {