mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +02:00
api/youtube: slight refactor of matchQuality
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user