mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
youtube: better audio checking
This commit is contained in:
parent
7071157580
commit
57051968f3
1 changed files with 3 additions and 3 deletions
|
@ -176,7 +176,7 @@ export default async function(o) {
|
|||
|
||||
if (bestQuality) bestQuality = qual(bestQuality);
|
||||
|
||||
if (!bestQuality && !o.isAudioOnly || !hasAudio)
|
||||
if ((!bestQuality && !o.isAudioOnly) || !hasAudio)
|
||||
return { error: 'ErrorYTTryOtherCodec' };
|
||||
|
||||
if (basicInfo.duration > env.durationLimit)
|
||||
|
@ -227,7 +227,7 @@ export default async function(o) {
|
|||
youtubeDubName: isDubbed ? o.dubLang : false
|
||||
}
|
||||
|
||||
if (hasAudio && o.isAudioOnly) return {
|
||||
if (audio && o.isAudioOnly) return {
|
||||
type: "render",
|
||||
isAudioOnly: true,
|
||||
urls: audio.decipher(yt.session.player),
|
||||
|
@ -252,7 +252,7 @@ export default async function(o) {
|
|||
|
||||
const video = adaptive_formats.find(checkRender);
|
||||
|
||||
if (!match && video) {
|
||||
if (!match && video && audio) {
|
||||
match = video;
|
||||
type = "render";
|
||||
urls = [
|
||||
|
|
Loading…
Reference in a new issue