youtube: ignore audio tracks when quality matching

merge pull request #340 from dumbmoron/yt-fix-quality-match
This commit is contained in:
wukko 2024-01-31 17:52:32 +06:00 committed by GitHub
commit 0c83522356
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,11 @@ const c = {
export default async function(o) { export default async function(o) {
let info, isDubbed, quality = o.quality === "max" ? "9000" : o.quality; //set quality 9000(p) to be interpreted as max let info, isDubbed, quality = o.quality === "max" ? "9000" : o.quality; //set quality 9000(p) to be interpreted as max
function qual(i) { function qual(i) {
return i['quality_label'].split('p')[0].split('s')[0] if (!i.quality_label) {
return;
}
return i.quality_label.split('p')[0].split('s')[0]
} }
try { try {