fix for youtube dubs rare error
This commit is contained in:
parent
3a4f8ef31b
commit
73d84c09d3
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,9 @@ export default async function(o) {
|
|||
audio = adaptive_formats.find(i => checkBestAudio(i) && !i["is_dubbed"]);
|
||||
|
||||
if (o.dubLang) {
|
||||
let dubbedAudio = adaptive_formats.find(i => checkBestAudio(i) && i["language"] === o.dubLang && !i["audio_track"].audio_is_default);
|
||||
let dubbedAudio = adaptive_formats.find(i =>
|
||||
checkBestAudio(i) && i["language"] === o.dubLang && i["audio_track"] && !i["audio_track"].audio_is_default
|
||||
);
|
||||
if (dubbedAudio) {
|
||||
audio = dubbedAudio;
|
||||
isDubbed = true
|
||||
|
|
Loading…
Reference in a new issue