mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-29 01:38:26 +00:00
api/youtube: slight refactor of matchQuality
This commit is contained in:
parent
5470926d52
commit
3dd6165472
|
@ -200,8 +200,8 @@ export default async function(o) {
|
||||||
|
|
||||||
const quality = o.quality === "max" ? 9000 : Number(o.quality);
|
const quality = o.quality === "max" ? 9000 : Number(o.quality);
|
||||||
|
|
||||||
const matchQuality = resolution => {
|
const matchQuality = res => {
|
||||||
const quality = resolution.height > resolution.width ? resolution.width : resolution.height;
|
const quality = res.height > res.width ? res.width : res.height;
|
||||||
return Math.ceil(quality / 24) * 24;
|
return Math.ceil(quality / 24) * 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue