mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +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
1 changed files with 4 additions and 2 deletions
|
@ -199,8 +199,10 @@ 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) => {
|
|
||||||
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,
|
let video, audio, dubbedLanguage,
|
||||||
|
|
Loading…
Reference in a new issue