1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Use pop instead of minBy

This commit is contained in:
gnattu 2024-09-14 17:55:13 +08:00
parent 2bb60e2241
commit 28552b2d1a

View file

@ -1,4 +1,3 @@
import minBy from 'lodash-es/minBy';
import globalize from '../lib/globalize';
export function getVideoQualityOptions(options) {
@ -38,7 +37,7 @@ export function getVideoQualityOptions(options) {
if (videoBitRate > 0 && videoBitRate < 120000000) {
// Push one entry that has higher limit than video bitrate to allow using source bitrate when Auto is also limited
const sourceOptions = minBy(bitrateConfigurations.filter((c) => c.bitrate > videoBitRate), (x) => x.bitrate);
const sourceOptions = bitrateConfigurations.filter((c) => c.bitrate > videoBitRate).pop();
qualityOptions.push(sourceOptions);
}