mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-19 14:47:06 +02:00
fix for youtube dubs rare error
This commit is contained in:
parent
3a4f8ef31b
commit
73d84c09d3
@ -54,7 +54,9 @@ export default async function(o) {
|
|||||||
audio = adaptive_formats.find(i => checkBestAudio(i) && !i["is_dubbed"]);
|
audio = adaptive_formats.find(i => checkBestAudio(i) && !i["is_dubbed"]);
|
||||||
|
|
||||||
if (o.dubLang) {
|
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) {
|
if (dubbedAudio) {
|
||||||
audio = dubbedAudio;
|
audio = dubbedAudio;
|
||||||
isDubbed = true
|
isDubbed = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user