api/youtube: slight refactor of matchQuality

This commit is contained in:
wukko 2024-10-31 21:37:11 +06:00
parent 5470926d52
commit 3dd6165472
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -200,8 +200,8 @@ export default async function(o) {
const quality = o.quality === "max" ? 9000 : Number(o.quality);
const matchQuality = resolution => {
const quality = resolution.height > resolution.width ? resolution.width : resolution.height;
const matchQuality = res => {
const quality = res.height > res.width ? res.width : res.height;
return Math.ceil(quality / 24) * 24;
}