mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-02 08:26:22 +01:00
api/youtube: slight refactor of matchQuality
This commit is contained in:
parent
5470926d52
commit
3dd6165472
1 changed files with 2 additions and 2 deletions
|
@ -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