god dammit, filter out the fucking ai dubs
This commit is contained in:
parent
f1927b465c
commit
0a2bf432a1
|
@ -137,7 +137,17 @@ export async function createSabrStream(
|
|||
if (!videoPlaybackUstreamerConfig) throw new Error('ustreamerConfig not found');
|
||||
if (!serverAbrStreamingUrl) throw new Error('serverAbrStreamingUrl not found');
|
||||
|
||||
const sabrFormats = playerResponse.streaming_data?.adaptive_formats.map(buildSabrFormat) || [];
|
||||
const sabrFormats = playerResponse.streaming_data?.adaptive_formats
|
||||
.filter(f => {
|
||||
if (f.has_audio) { // this is an audio track, we need to filter out the ai dubs
|
||||
if (f.is_auto_dubbed) return false
|
||||
if (!f.audio_track?.audio_is_default) return false
|
||||
if (!f.audio_track.display_name.endsWith('original')) return false
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
.map(buildSabrFormat) || [];
|
||||
|
||||
const serverAbrStream = new SabrStream({
|
||||
formats: sabrFormats,
|
||||
|
|
Loading…
Reference in New Issue