mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 18:46:09 +00:00
api/youtube: adjust matched resolution
heights like 714 are now adjusted to 720, so that preferred quality is picked correctly
This commit is contained in:
parent
da72b9615e
commit
5470926d52
|
@ -199,8 +199,10 @@ export default async function(o) {
|
|||
}
|
||||
|
||||
const quality = o.quality === "max" ? 9000 : Number(o.quality);
|
||||
const matchQuality = (resolution) => {
|
||||
return resolution.height > resolution.width ? resolution.width : resolution.height;
|
||||
|
||||
const matchQuality = resolution => {
|
||||
const quality = resolution.height > resolution.width ? resolution.width : resolution.height;
|
||||
return Math.ceil(quality / 24) * 24;
|
||||
}
|
||||
|
||||
let video, audio, dubbedLanguage,
|
||||
|
|
Loading…
Reference in a new issue