mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-16 03:45:14 +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 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue