mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix some bugs reported by sonarCloud
This commit is contained in:
parent
92b1cb3aa3
commit
03a6269b5f
3 changed files with 7 additions and 9 deletions
|
@ -33,18 +33,18 @@ function showQualityMenu(player, btn) {
|
|||
return opt;
|
||||
});
|
||||
|
||||
let selectedId = options.filter(function (o) {
|
||||
const selectedId = options.filter(function (o) {
|
||||
return o.selected;
|
||||
});
|
||||
|
||||
selectedId = selectedId.length ? selectedId[0].bitrate : null;
|
||||
const selectedBitrate = selectedId.length ? selectedId[0].bitrate : null;
|
||||
|
||||
return actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: btn
|
||||
}).then(function (id) {
|
||||
const bitrate = parseInt(id);
|
||||
if (bitrate !== selectedId) {
|
||||
if (bitrate !== selectedBitrate) {
|
||||
playbackManager.setMaxStreamingBitrate({
|
||||
enableAutomaticBitrateDetection: bitrate ? false : true,
|
||||
maxBitrate: bitrate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue