mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +02: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:
@ -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,
|
||||
|
Reference in New Issue
Block a user